Image copyright Reuters Image caption Ms Yacob is a former MP from Singapore's ruling party

Singapore has named its first female president, Halimah Yacob.

A popular public figure, Mrs Halimah was widely expected to win the presidential election, but instead will begin her term amid controversy.

So why are Singaporeans not happy to get the president many wanted?

'Selected, not elected'

For starters, there hasn't been and won't be an election - she just got the job in a "walkover" because there were no other eligible candidates.

Image copyright Getty Images Image caption The PAP, led by Lee Hsien Loong (centre) has won every election in Singapore since independence in 1965

Singaporeans are used to predictable elections, with the same party winning every parliamentary poll in the carefully managed country's 52-year history, last time with a landslide.

It's partly due to loyalty to the ruling People's Action Party (PAP), but also because the government tightly controls the media and political freedoms.

As the head of state, the president plays a largely ceremonial role and doesn't hold much power, apart from having some say in the use of Singapore's hefty financial reserves.

Still, many were looking forward to exercising their vote this time round, and were angry to hear on Monday that Mrs Halimah was the only candidate.

There were two other possible candidates in the running, businessmen Salleh Marican and Farid Khan.

But a government-appointed committee decided they were not eligible as their companies didn't have at least $500m (£280m; $370m) in shareholders' equity, a rule that was recently tightened by the government.

Image copyright AFP Image caption There are also many Singaporeans thrilled to see Mrs Halimah become president

Mrs Halimah doesn't qualify under that rule either, but she made the cut because she used to be speaker in Singapore's parliament, and those who've held certain public office positions can qualify for the presidency.

It has led some to joke online that the president has been "selected, not elected".

Image copyright Facebook

Others vented on social media using the #NotMyPresident hashtag used in the US after Donald Trump won the election there.

Content is not available

'Racial purity' debate

Mrs Halimah, who is Muslim, is only the second president to come from the Malay ethnic minority.

It's a move that should be celebrated by Singapore, which prides itself on its multiculturalism and diversity.

But instead, this has fired up one of the biggest controversies of the presidency.

That's because this election was only open to Malay candidates - the first time the government has reserved an election for a particular race.

Image copyright AFP/Getty Images Image caption Mrs Halimah (left) used to be speaker in Singapore's parliament

The government, which lauds its careful maintenance of national racial harmony, argued it was necessary to ensure minorities could have a chance at becoming president in Chinese-majority Singapore, which has always had an ethnically Chinese prime minister.

But some Malays saw the move as positive discrimination that went against Singapore's golden rule of meritocracy, which is that the best person gets the job, regardless of background.

It also stirred up questions about Malay racial purity, after people realised Mrs Halimah was half-Indian, and many have mocked her ethnicity.

The irony is that Singapore's government has often clamped down on such discussion, fearing it would hurt racial harmony.

Image copyright Facebook

"Racial questions are popping up... yet the G [government] cannot tamp this down because it had opened the can of worms in the first place," wrote political commentator Bertha Henson.

"Now, the discussion is described as 'mature'' when, in other instances, it would have been slapped down as being inimical to social order."

'How stupid they think we are'

While some Singaporeans are delighted to see Mrs Halimah in office, others are unhappy at what they say is overt manipulation of the process by the government.

Some believe the government deliberately took measures to block former presidential candidate Tan Cheng Bock, who came very close to defeating the government's man at the last election and who wanted to contest again.

Image copyright Sonny Liew Image caption One popular joke online is a pun on Mr Tan's name, referencing the view that he was "blocked" from the election

One view is that the government did not trust voters to choose their candidate this time round, despite the fact that it was Mrs Halimah, a former union leader who had broad appeal and was aided by extensive and favourable coverage in Singapore's state-friendly media.

"Singaporeans have always known that our politicians... consider themselves superior beings," said writer Sudhir Thomas Vadaketh. "Now, with this reserved presidency, we have irrefutable proof about just how stupid they think we are."

The government recently acknowledged the outrage by noting that the changes to the presidency might cost them "political capital", but argued it did what it had to do for "the future of the country".

But some wonder if it has cost the country more. "The risk of we, the people, denying Halimah her mandate was probably too great for the PAP," wrote poet Alfian Sa'at.

"And thus they would much rather deny us the right to confer her with a mandate... no matter how much cynicism and loss of trust it breeds towards our political systems."

Image copyright Sonny Liew Image caption Singaporean artist Sonny Liew drew this comic referencing the belief among some that the election was rigged

Singaporeans now have mixed feelings about their new president.

Some, like the commentator Ms Henson, feel she is the "only good thing" in the whole episode and argue she is still "a decent person with a good heart", but others have accused her of complicity.

Mrs Halimah, meanwhile, has largely sidestepped questions about the controversy.

She told reporters earlier this week: "I promise to do the best that I can to serve the people of Singapore, and that doesn't change whether there is an election or no election."