The foreign secretary said people should "follow the rules" of other countries when asked about a British 18-year-old who has been sentenced to a year in prison in Dubai.
Marcus Fakana, from Mr Lammy's Tottenham constituency, had a "holiday romance" with a girl who was 17 while with his family in the United Arab Emirates (UAE). The girl, who is also from London, is now 18.
But after campaign group Detained In Dubai said his treatment was a "disgrace", the foreign secretary David Lammy said he has had "all the support available" from UK officials.
Read more: 18-year-old jailed in Dubai for sex with 17-year-old pleads for ruler to 'let me go home'
"It is the case wherever you are in the world - and that's why the Foreign Office makes clear on its website what the rules are - that you follow the rules and the law according to that country," he said.
Fakana felt abandoned by the British government since his arrest in September, according to Detained in Dubai.
He said the pair kept their romance secret from the girl's family "because they were strict" and had hoped to continue seeing each other back in the UK.
However, he said police turned up at his family's hotel and took him into custody without explanation.
Read more from Sky News:
How abusers spy on partners with 'parental control' apps
Strictly Come Dancing's first blind winner
Suspected norovirus cases double the five-year average
Detained In Dubai said Fakana was arrested and charged after the girl's mother found their chats and pictures when they got back to the UK and called Dubai police.
Speaking in temporary accommodation while on bail, Fakana, told the campaign group Detained in Dubai earlier this week that he and his family are "devastated and in shock".
"I never intended to break the law. It didn't occur to me at the time and for that, I'm sorry. I am asking His Highness, Sheikh Mohammed al Maktoum to please forgive me and pardon me.
"Let me go home. Please give me my life back," the BBC reported.
In Dubai, the age of consent is 18 and strictly enforced.
"Under UAE law, the girl is legally classified as a minor, and in accordance with procedures recognised internationally, her mother - being the legal guardian - filed the complaint," said the prosecutors in a previous statement.
"Dubai's legal system is committed to protecting the rights of all individuals and ensuring impartial judicial proceedings."
Fakana is expected to appeal against the sentence.
(c) Sky News 2024: Foreign secretary says people should 'follow the rules' in other countr