BOSTON — Former Congressman Barney Frank, the first member of Congress to voluntarily come out publicly as gay and a liberal bulldog who left his fingerprints on the nation’s banking regulations, died on Tuesday. He was 86.

Frank announced in early May that he had begun hospice care at his home in Maine. 

“He has been such a tremendous asset for not only Massachusetts but the entire country. This makes us very sad,” Senate President Karen Spilka said when she heard the news Wednesday morning. “He stood out and stood up and was a voice for so many people when they had no voice.”

Gov. Maura Healey ordered flags to be flown at half-staff at all state buildings.

“Barney Frank was one of a kind — a giant in public life who helped change Massachusetts and America for the better,” the governor said in a statement. “Over the course of his career, Barney fought tirelessly for working people, civil rights and LGBTQ+ equality. He was brilliant, fearless, quick-witted and never afraid to say exactly what was on his mind. Barney was a relentless advocate and someone who understood both the urgency and the complexity of the issues he took on.”

A Democrat, Frank was elected to the Massachusetts House in 1972 after winning a four-person Democratic primary and besting Republican Virgil Aiello in the general election. He brought to the House his experience as chief of staff to Boston Mayor Kevin White.

Frank represented Boston’s Back Bay and Beacon Hill until 1980, when he won election to Congress. Redistricting soon pitted the freshman Frank, then a Newton Democrat, against incumbent Republican U.S. Rep. Margaret Heckler in his first congressional reelection campaign, in 1982. He won that contest.

Frank was a member of Congress in 1987 when he became the first to voluntarily come out as gay. Fellow Massachusetts delegation member U.S. Rep. Gerry Studds was the first congressman to be outed, but his revelation came in connection with the 1983 congressional page sex scandal rather than on his own accord.

In 1990, Frank was reprimanded by the House in connection to his two-year relationship with Steven Gobie, a male prostitute who had run an escort service out of their apartment. After an 11-month investigation, the House Ethics Committee found that Frank was unaware of the criminal activities but had lied in an unrelated memo about how he and Gobie met.

Despite the scandal and public calls for his resignation, Frank won reelection with 66% of the vote that year. And he didn’t shy away from scandal and controversy.

During the “Contract With America” phase of the mid-1990s, Frank often sparred with U.S. House Speaker Newt Gingrich. Later in the decade, he was one of the leaders of Democrats’ attempts to block GOP efforts to impeach President Bill Clinton over the Monica Lewinsky sex scandal.

With Democrats in control of the House, Frank was elevated to the chairmanship of the House Committee on Financial Services, serving in the post from 2007 to 2011 — giving him tremendous influence over the nation’s banking system as the 2008 financial meltdown took hold.

In its aftermath, he and U.S. Sen. Christopher Dodd of Connecticut wrote legislation aimed at a sweeping overhaul of the financial services industry. President Barack Obama signed the Dodd-Frank Wall Street Reform and Consumer Protection Act into law in July 2010, though Republicans have since chipped away at some of its provisions.

Frank retired from Congress and did not seek reelection in 2012.

“Barney Frank was a trailblazer — someone who never hesitated to stand up for what he believed in or speak his mind. Our commonwealth and our country were better because of his service,” Congressman Seth Moulton said on Wednesday. “I was grateful for the chance to know him over the years. We should honor Barney by continuing to fight for more affordable housing and consumer protections.”

“Massachusetts and the entire country have lost a giant of American politics with the passing of Congressman Barney Frank,” U.S. Sen. Ed Markey said in a statement. “His legacy of reform and consumer protection reaches from the Wall Street trading floors that he reined in, to the homes of the South Coast fishermen whose way of life he championed and protected. Barney was simultaneously visionary and effective, a liberal and a pragmatist.”

Frank is also remembered as one of the most quotable elected officials from Massachusetts.

“There are three lies politicians tell,” Frank told a real estate group in 2009, according to reporting in The New Yorker. “The first is ‘We ran against each other but are still good friends.’ That’s never true. The second is ‘I like campaigning.’ Anyone who tells you they like campaigning is either a liar or a sociopath. Then, there’s ‘I hate to say I told you so.’ … Everybody likes to say ‘I told you so.’ I have found personally that it is one of the few pleasures that improves with age. I can say ‘I told you so’ without taking a pill before, during or after I do it.”

“Barney’s wit was legendary,” Markey said, “and he used it as a powerful tool of engagement. No matter the situation, he got people laughing. And he could use that laughter to pierce the arguments of his antagonists on the House floor and in the hearing room, simplifying what they called intractable problems, but what he knew were simple solutions that everyone understood.”

Markey described Frank as “one of the smartest, funniest, most insightful, most unapologetic yet practical leaders” that he had ever met.

“He remained so for the entire time we worked together and after,” he added. “I was honored and inspired to serve alongside him for Massachusetts, to vote alongside him in the most consequential of national debates, and to call him a lifelong friend.”