In a speech after the historic vote, Erdogan said they are ushering in a new era for the party’s work in the service of the country and nation.

He added: "The coming months will be like spring for every single area in Turkey, from fighting terrorism to the economy, from rights and freedoms to expanding investments."

He also said, "The trouble which is suffered on the way to the nation's service is no burden but an honor."

Less than three years after giving up the post, a revised Constitution passed in last month’s public referendum gave Erdogan the chance to return to the party helm at an extraordinary party congress in the capital Ankara.

The new Constitution restores to presidents the right to belong to a political party, a right enjoyed by Turkey’s first three presidents, including republic founder Mustafa Kemal Ataturk.

At the congress, the party delegates not only elected their leader but also members of the party's boards: the Central Decision and Executive Board (MKYK), Central Disciplinary Board (MDK), Intra-Party Democracy and Arbitration Board, and Political Virtue and Ethics Board.

Some articles in the party bylaws were also changed. One change paved the way for Prime Minister Binali Yildirim -- who bowed out as party chairman, making way for Erdogan -- to serve as acting chairman, representing Erdogan in day-to-day party matters.

The principle of "one nation, one country, one government, one flag" was also added to the AK Party's bylaws.

The party delegates also gave the MKYK the power to form and dissolve the party's ground-level organizations.

In another change to the bylaws, deputies are still limited to serving three terms in parliament, but now the MKYK is allowed to make exceptions to this rule. 

Fourth president with party membership

Erdogan became the fourth president to retain his party ties. Mustafa Kemal Ataturk, founder of the Republic of Turkey, maintained his membership in the Republican People’s Party (CHP), as did his successor, Ismet Inonu.

Turkey’s third president, Celal Bayar, was also a member of the Democrat Party.

Turkish presidents maintained party ties until the country’s 1960 coup. The post-1960 coup Constitution forced them to cut their links to political parties, as did the Constitution emerging from another coup, in 1980.

Erdogan led the AK Party for 13 years, starting from its foundation in 2001, but had to step aside when he became president in August 2014, due to the legal requirement for presidents to be politically neutral.

When the party won the November 2002 election with two-thirds of the seats in parliament, it became the first party to win an outright majority in over a decade.

During his time as prime minister, Erdogan oversaw general elections in 2007 and 2011, both times returning the AK Party to power with a greater share of the vote.

The party also performed well in local elections in 2004, 2009, and 2014, when it secured 18 out of 30 mayoral seats in larger cities.

When Erdogan stood for the presidency in 2014 he received 52 percent of the vote, and Ahmet Davutoglu officially took charge of the party.

The June 2015 general election saw the party returned as the largest in parliament, but it failed to retain its overall majority, taking 258 of 550 seats. After talks to form a coalition floundered, a snap poll in November saw the AK Party returned with a majority of 317 seats.

Anadolu Agency