Two men in Thailand are in trouble with the law thanks to an Instagram photo posted by pop star Rihanna during her recent visit to the holiday island of Phuket.

The singer was visiting Phuket for a few days between stops on her Diamonds World Tour, departing on Sunday for Singapore.

During Rihanna's visit she shared many of her experiences on Twitter and Instagram , including a photo of her holding a loris -- an endangered primate native to Southeast Asia.

The Instagram picture, believed to have been taken at Phuket nightlife hotspot Bangla Road, was captioned "Look who was talkin dirty to me!" and "liked" by more than 230,000 viewers.

Singer Rihanna causes trouble when she takes a photo with an endangered species in Thailand.

Oakland, California, school kids put their spin on Rihanna's "Don't Stop the Music" to combat truancy.

Rihanna fans pelt her with chips after she reportedly arrives late to a concert.

The problem is, it's illegal for anyone to charge tourists money to take photos with the endangered primates -- an issue wildlife groups have long been trying to stamp out on the island.

Thai authorities react swiftly

Officials in Thailand quickly went on the defensive when outrage over Rihanna's loris image spread.

The government ordered the Ministry of Natural Resources and local Phuket officials to urgently investigate the matter, reported local website Phuketnews.com

Sunday night, a raid on suspected touts led to the arrest of two men, aged 16 and 20, who were taken to a local police station and presented to the media.

"It is very difficult to do the raids because the touts have spies," Awat Nithikul, leader of the patrol officers, told The Phuket News.

"If someone hears that the police are coming their way, there will be a person who calls the touts and tells them to move. But this is a big deal because it might affect Thailand's reputation."

The newspaper says the two arrested touts are waiting to be bailed, and the two lorises in their possession will be returned to a national park in the nearby province of Phang Nga.

Rihanna's X-rated experiences

It wasn't just the loris issue that stirred up controversy during Rihanna's visit.

Rihanna's tweets about her X-rated experiences relating to some of the country's more infamous tourist attractions also led to red-faced explanations by embarrassed officials.

According to the Bangkok Post , an English-language daily newspaper, Rihanna's tweets led to one official saying, "Sex shows were completely against the law."

"The authorities and law officials have surveyed the area to arrest and fine those involved [in staging sex shows]," he said. "But the shows still happen."