Canadian pop star Justin Bieber sparked a buzz on the Internet Wednesday when he posted a photo of his visit to controversial Yasukuni Shrine on Instagram, a photo-sharing service.

In the photo, which was shared onto Twitter Wednesday morning, Bieber is seen standing in front of the shrine's main hall.

The photo, which was accompanied by the comment "Thank you for your blessings," was quickly reposted by others and spread before being taken down Wednesday afternoon.

Bieber took some flak on Instagram for visiting the war-linked Shinto shrine in Tokyo.

An official Twitter account run by Bieber's team also posted photos of him visiting Yasukuni, where millions of Japanese soldiers who died for the state in modern wars are inshrined, as well as convicted Class-A war criminals.

Some nations see the shrine as a symbol of Japan's wartime aggression and visits by Japanese lawmakers and Cabinet members have aggravated diplomatic tensions with China and South Korea.

Later on the day, Bieber posted an apology on Instagram.

"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," he wrote.

Last April, Bieber caused a similar stir when he and his entourage visited the Anne Frank House in Amsterdam. He posted on his Facebook page that he wrote in the museum guest book that if the 13-year-old had survived the Holocaust, she would have been a "Belieber," a term the singer uses to refer to his fans. Critics said Bieber wasn't taking Frank's dire situation seriously.