Singapore: Five local men are being held for allegedly hacking the websites of Singapore’s president and prime minister, police said on Tuesday, amid a rash of cyber attacks in the city-state.

Police said in a statement the suspects had “exploited a vulnerability” in both websites to display pages from other sources last week.

A “subpage” of the website of the Istana, the official residence of President Tony Tan, was hacked and displayed a crude image early last Friday. This came an hour after Prime Minister Lee Hsien Loong’s website was hacked and showed mocking messages from international activist hackers’ group, Anonymous.

Police said the five suspects are local men aged between 17 and 45.

Another Singaporean, 35-year-old James Raj, was charged in court earlier on Tuesday for hacking a local council’s website and posting an image of a Guy Fawkes mask, the international symbol of Anonymous.

Raj was charged with hacking into the website of the Ang Mo Kio town council, a district whose team of MPs representing in parliament is led by Premier Lee, on October 28, and posting the image.

The hacking took place three days before a self-proclaimed spokesperson for Anonymous demanded in a video that Singapore scrap a law requiring news websites to obtain annual licenses.

The new Internet licensing rules came into force in June and have angered bloggers and activists who say they are allowed to express opinions.

Singapore strictly regulates the traditional media, but insists the new licensing rules do not impinge on Internet freedom.

A charge sheet seen by AFP mentioned no direct links between Anonymous and Raj, who is also facing drugs charges.

According to the charge sheet, Raj identified himself as ‘The Messiah’ and carried out the intrusion from an apartment in Kuala Lumpur, the capital of Malaysia.

The same moniker was used by someone who hacked a reporter’s blog on the website of the pro-government Straits Times newspaper on November 1.

Raj is also accused of posting a banner on the municipal website which said that one of its members of parliament was tendering his resignation.

He faces a maximum fine of Sg$10,000 (Dh29,347) and imprisonment of up to three years.

Raj’s lawyer, M. Ravi, opposed his client’s continued detention and another hearing was scheduled later on Tuesday.

Police said Raj was also linked to a series of hacking incidents, including penetrating the website of a charity group related to the ruling People’s Action Party.

It is said, Raj and the hackers who allegedly defaced the president and prime minister’s websites were not linked.

Prime Minister Lee last week warned that his government would “spare no effort” in going after Anonymous members, who threatened to wage a “cyber war” over the new Internet licensing rules.