Reed Gusciora, an openly gay man, was sworn in as mayor of Trenton, New Jersey on Sunday.

The longtime Democratic assemblyman came out in 2006 to become New Jersey's first out legislator.

On Sunday, he became Trenton's first openly gay mayor. Gusciora was sworn in a day after he resigned the legislative seat he had held for 22 years.

Gusciora was elected last month, defeating Paul Perez, also a Democrat, in a runoff election.

As a Democratic member of the General Assembly, Gusciora, 58, co-sponsored a bill that sought to extend marriage rights to gay and lesbian couples. Republican Governor Chris Christie vetoed the legislation. Gay couples began marrying in New Jersey after the state's highest court struck down the state's ban in 2013.

In its 2013 Municipal Equality Index (MEI), the Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, ranked New Jersey's capital as the least gay-friendly city in the state.