A Washington Heights assemblywoman was forced to resign Friday as she pleaded guilty in Manhattan federal court to a sham marriage that paved the way for her to become a US citizen — and the first Dominican woman elected to a legislative office in New York.

Her head hanging in shame, Gabriela Rosa, 47, elected in 2012, admitted to filing bogus documents with the federal government in which she lied about her first marriage to obtain citizenship.

Rosa paid $8,000 to a US citizen to engage in the fraudulent nuptials while she maintained a romantic relationship with another man. She is currently married to Victor Estrella and has a 14-year-old son.

Rosa admitted to committing the fraud between 1996 and December 2005, when she became a US citizen.

“I married the person, and it was not a real marriage,” she told Judge Denise Cote.

Her resignation was part of a plea deal and she is banned from ever again seeking office in the United States. The feds said that despite the fraud, they now consider Rosa a US citizen and will not deport her back to her native Dominican Republic.

In her official biography, which was scrubbed from the Assembly Web site within minutes of her plea, Rosa had boasted of becoming a US citizen.

“In 2005, Gabriela became a proud United States citizen, allowing her to deepen her involvement in government and civics by running for office and opening the door for her to further improve the lives of her neighbors in northern Manhattan,” the bio stated.

Rosa also pleaded guilty to making false statements in a 2009 personal-bankruptcy filing. She failed to include her husband’s earning and omitted her ownership of a co-op apartment.

Rosa, who once worked as a legislative aide to Assemblyman Herman “Denny” Farrell, also failed to list outside income she earned as a political consultant.

The plea deal calls for her to spend between 12 to 18 months in prison and for a potential fine of up to $250,000. She will be sentenced on Oct. 3 and was released on $100,000 bail.

Outside court, Rosa insisted her crime was different than those of other corrupt pols.

“I never abused my office . . . I did not get rich. I did not take any bribes that you usually see other people get,” she said.

Rosa is an ally of both state Sen. Adriano Espaillat — who was narrowly defeated Tuesday in the Democratic primary against incumbent Rep. Charles Rangel — and Councilman Ydanis Rodriguez. Rosa was visible on the campaign trail for Espaillat.