Latvian Foreign  Minister  Edgars Rinkevics, left, is greeted by Moldovan President Nicolae Tomofti during Rinkevics's official visit in Chisinau, Moldova, on Feb. 25, 2014. (Dumitru Doru/EPA)

MOSCOW — Latvian Foreign Minister Edgars Rinkevics announced Thursday that he was gay, breaking a barrier in Eastern Europe’s socially conservative political arena.

The declaration, made via a cheerful Twitter posting, immediately gave gay rights advocates a prominent voice in post-Soviet Eastern Europe. The region — where openly gay public figures are a rarity — has significantly lagged behind the United States and Western Europe in its acceptance of same-sex relationships.

The announcement came less than two months before Latvia assumes the European Union’s rotating presidency on Jan. 1, giving Rinkevics an even higher-profile platform from which to push for more tolerance for same-sex relationships.

“Our country has to create a legal status for all kinds of partner relationships, and I will fight for this. I know that there will quickly be mega-hysteria, but #proudtobegay,” he wrote Thursday on Twitter.

A spokesman confirmed the authenticity of the post. Rinkevics, 41, one of Latvia’s most popular politicians, had long declined to discuss his personal life. He is a member of the ruling Unity party and since 2011 has been foreign minister of the Baltic nation of 2 million people.

Latvia enacted a constitutional ban on same-sex marriage in 2005, and very few gay men and lesbians in the country are open about their sexuality. A law that would confine sex education in schools to traditional opposite-sex marriage is making its way through Parliament.

Rinkevics declined Thursday to comment on the timing of the announcement. It came a day after his post as foreign minister was confirmed as part of Latvia’s new government. The nation held parliamentary elections last month.

Many other former Eastern Bloc countries also have constitutional bans on same-sex marriages, and openly gay people have frequently complained about discrimination.

The announcement comes at a time when tensions between the West and Russia, which has styled itself as a bastion of traditional family values, are at their highest level since the Cold War. Russia forbids “gay propaganda” to minors, a law that gay rights advocates say has been used to persecute them. After Apple chief executive Tim Cook announced last week that he was gay, an iPhone-shaped monument to Apple founder Steve Jobs was taken down in St. Petersburg.

Openly gay European politicians have been subject to snipes from Eastern European leaders in the past.

“It’s better to be a dictator than gay,” Belarusan President Alexander Lukashenko once said in response to criticism of his human rights record from then-German Foreign Minister Guido Westerwelle, who is openly gay.