Mr. Frank, Democrat of Massachusetts, became, in 1987, the first sitting member of Congress to volunteer that he was gay. He is now the first to be married to a partner of the same sex. Both bridegrooms said they recognized the historical significance of the ceremony, which lasted less than five minutes. Governor Patrick told the guests that Mr. Frank had requested that the service “be short and to the point.”

And in vows written by the couple, Mr. Frank and Mr. Ready pledged to love each other “on MSNBC or on Fox” and “in Congress or in retirement,” a reference to Mr. Frank’s decision not to seek another term.

It was yet another signal moment for Mr. Frank, who was born into a blue-collar family in Bayonne, N.J., and whose debating skills and legislative prowess made him one of the most powerful lawmakers in Washington. He maintained that stature despite a 1989 scandal that threatened to derail his career when an ex-boyfriend’s activities led to an 11-month ethics investigation.

In October 2005, Mr. Ready — a carpenter and welder who specializes in awnings and runs a small shop, Jim of Most Trades, in Ogunquit, Me. — had been dragged to a local fund-raiser by his longtime partner, Robert Palmer, who knew Mr. Frank from his days as an adviser to Michael S. Dukakis when he was governor of Massachusetts.

At the time, Mr. Ready was acting as a full-time caretaker: Mr. Palmer had been struggling with serious illness, and both men knew that he was dying.