Justin Bieber
Justin Bieber instagram photo of Yasakuni war shrine Justin Bieber/Instagram

Teenage popstar Justin Bieber has been forced to apologise after his visit to Japan's controversial Yasakuni war shrine caused a controversy in China.

The Canadian pop icon posted two pictures of him at the Shinto shrine on his Instagram account and then tweeted the link to his 51 million Twitter followers with the message "Thank you for your blessings.

The shrine, which honours 2.5 million war dead including 14 convicted war criminals by an Allied tribunal after World War II , is seen across Asia - in China and South Korea in particular - as a symbol of Japan's past militarism and lack of repentance for its imperialist attitude.

As the story gained momentum on social media, Chinese netizens started slamming the 20-year-old for his ignorance. The pictures were subsequently removed.

After 13 hours, Bieber issued an apology on his instagram feed:

While in Japan I asked my driver to pull over for which I saw a beautiful shrine. I was mislead to think the shrines were only a place of prayer. To anyone I have offended I am extremely sorry. I love you China and I love you Japan.

Chinese foreign ministry spokesman Qin Gang said he had not been aware of Bieber's visit to the shrines.

"I hope that this Canadian singer after visiting the Yasukuni shrine can have a clear understanding of Japan's history of invasion and militarism, and of the source of Japan's militarism."

The incident came before US president Obama arrives in Tokyo at the beginning of his Asian tour.

AFP reported that on Tuesday nearly 150 Japanese lawmakers paid homage at Yasakuni, sparking protests from China, which said an offering earlier in the week by Prime Minister Shinzo Abe was "a slap in the face" for Obama.