WARSAW, Poland — A same-sex Los Angeles couple was dumbfounded when Homeland Security agents showed up at their home in 2016 with the news that a beloved old portrait hanging in their kitchen had been looted by the Nazis from Poland’s National Museum during World War II.

With heavy hearts, they relinquished the 17th-century painting, “Portrait of a Lady” by the Flemish artist Melchior Geldorp, which they had bought unaware of its origins, donating along with it a 19th-century frame that they had bought for it.

The portrait is now hanging again in the National Museum in Warsaw, nearly eight decades after its theft, its return welcomed in a ceremony last September attended by Poland’s culture minister, the American ambassador and the couple.

The two men, Craig Gilmore and David Crocker, were recently back in Poland using the connections they gained with their goodwill gesture to reach out to the local LGBTQ community, offering financial donations and messages of solidarity to a group that faces misunderstanding and discrimination.

Poland’s conservative ruling party leader, Jaroslaw Kaczynski, recently called the LGBTQ rights movement a foreign import that threatens Poland, a predominantly Roman Catholic nation where some see liberal Western values as eroding their own traditions. The National Museum has itself been a focus of the government’s conservative drive, with some officials seeking recently to remove erotic or feminist works.

In early April, with cameras rolling, Gilmore, an opera singer, dropped to one knee in a Warsaw park and proposed to Crocker, an artist, who said yes. Gilmore said while the two 55-year-olds have discussed marriage during their more than 20 years together, it felt right to do in a place where neither same-sex marriages nor civil unions are allowed.

Gilmore said they hoped with their gesture to “invite the Polish LGBTQ community to join in our joy. David and I are confident that very soon they will prevail in their struggles.”

The local LGBTQ community appreciated the show of solidarity but saw its limits.

“It was a nice and brave gesture to do it in Warsaw, the capital of one of the few remaining EU countries not to recognize any form of partnership between people of the same sex, but the problems are too massive and profound to be changed symbolically,” said Vyacheslav Melnyk, the director of Campaign Against Homophobia.

The men were deeply attached to the 1628 painting, which they bought at an art auction in New York about a decade ago for $5,000. They had no idea of its history but when they learned that it was looted during the war they knew that giving it up was the right thing to do, mindful of the tragedy that befell the Polish population during the German occupation.

They also wanted to show a gesture of solidarity to the Jewish community in Warsaw and had meetings and made a donation to the education department of the POLIN Museum of the History of Polish Jews during their recent visit.

“The U.S. Embassy is very proud of them,” Dan Hastings, the U.S. cultural attache, told The Associated Press at a private reception for them at the National Museum.

In a museum library, the couple’s old painting of a lady in a neck ruff was put out on display as the two mingled with U.S. diplomats, LGBTQ activists and museum representatives.

“These are all organizations that the U.S. diplomatic mission has supported or is supporting right now. So we love to see it when our own citizens get involved and pick up the baton of cooperation,” Hastings said. “Craig Gilmore and David Crocker are truly admirable citizen ambassadors because of what they’ve done with this relinquishing of looted art from Poland.”

For the United States, it was a welcome opportunity to highlight U.S. efforts to help fellow NATO member Poland recover its lost cultural heritage.

Poland saw much of its cultural patrimony destroyed or looted during the country’s wartime occupation by Nazi Germany and the Soviet Union, and about 500,000 objects remain missing.

The country has been making efforts to recover as much as possible. The Culture Ministry has a Division for Looted Art that keeps a database of missing objects and scours foreign collections and auctions. When they locate a looted Polish painting, book or other object, they inform law enforcement officials of that country.

Polish authorities say no other government has done as much to help Poland on this as the United States. Culture Minister Piotr Glinski, while celebrating the return of another painting recovered with U.S. help in 2017, praised the work of FBI agents, who he said “cooperated very effectively” with the Division for Looted Art.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM