The British government on Friday ordered a rainbow gay rights flag to be flown above its main office in Belfast - Stormont House - to coincide with the largest gay pride festival in Northern Ireland, the only British region where gay marriage is illegal.
Gay marriage has been repeatedly blocked in Northern Ireland by the powerful Democratic Unionist Party (DUP).
The DUP is currently backing British Prime Minister Theresa May's government after her Conservative Party lost its majority in the UK general election in June.
The Conservative Party was heavily criticized by opposition parties and the British media for doing a deal with a party as socially conservative as the DUP.
"Flying the flag during this week demonstrates our department's recognition and support of the LGBT+ community in Northern Ireland and across the rest of the UK," a British government spokeswoman said.
The UK government's Secretary of State for Northern Ireland, James Brokenshire, earlier told the Irish News newspaper that he hoped Northern Ireland's devolved parliament would change its position on gay marriage.
"Whilst policy on equal marriage is entirely a devolved matter for politicians within the Assembly, I voted in support of equal marriage in England and Wales and like the Prime Minister hope this can be extended to Northern Ireland in the future," Brokenshire was quoted as saying.
Leo Varadkar, the Republic of Ireland's first openly gay prime minister, was visiting Northern Ireland on Friday and is due to attend an event connected with the Belfast Pride festival on Saturday morning, though he said he would not attend Saturday's parade.
Reporting by Ian Graham; Writing by Conor Humphries; Editing by Andrew Bolton