HALLOWELL — State Rep. Sharon Treat entered the Legislature in a time of divided government and is leaving it in another.

Treat, 58, a Hallowell Democrat and attorney, is winding up what will likely be her last year in Augusta, representing her home city, Farmingdale, and West Gardiner.

She has served 22 of the last 24 years – 14 in the House of Representatives and eight in the Senate – and is one of only four current state representatives to have served seven House terms.

Treat has been well-known for specializing in issues affecting insurance, health care, trade and the environment.

“I’ve tried to be a legislator that was there to help work through some of the more complicated issues at the Legislature,” she said in an interview.

Her career has had many highs and lows. After a stint an environmental lobbyist, she was elected to the House in 1990, when Republican John McKernan was governor and Democrats controlled the Legislature, an atmosphere that led to the last state shutdown in 1991.

By 2002, Treat was Senate majority leader. In 2010, she narrowly kept a House seat amid a Republican wave that saw Democrats lose their legislative majorities. Gov. Paul LePage also took office then, and his veto pen has kept Democrats from accomplishing much since they took back legislative majorities in 2012.

The two years Republicans controlled the Legislature were frustrating ones for Treat. They repealed a number of state drug disclosure laws in 2011, most of which Treat sponsored. Laws stricken included provisions that required drug companies to report pricing information, amounts spent on marketing and results of clinical trials.

Treat has been a longtime foe of the pharmaceutical industry, sponsoring Maine’s Rx Plus in 2003, aimed at lowering drug costs. She said she thought the prescription drug industry was the main force behind the disclosure repeals.

“These are things that actually helped people,” Treat said. “They were about reducing drug prices and making medicine available to people.”

In 2002, Treat also sponsored the bill that created Dirigo Health, a Democrat-led plan that once was seen as a large step toward universal coverage in Maine.

But Republicans phased it out by 2013. They also deregulated Maine’s health insurance market by passing a 2011 bill that Treat said then was “rushed.”

She saw a similarly tense atmosphere in 1995, when independent Gov. Angus King, now a U.S. senator, took office and Republicans controlled the Senate while Democrats ran the House.

Treat chaired the Legislature’s Judiciary Committee with Republican Sen. Peter Mills, who now heads the Maine Turnpike Authority. Mills said the committee passed many bills along to the Legislature unanimously, a feat in a time of partisanship.

“I think we both approached management of the committee with a level of maturity that you don’t often see,” he said.

But Mills said Treat is “distinctly partisan” on health care and insurance, which helped raise tensions with Republicans leading up to 2011.

Treat also cited victories during her tenure, including a bill that expanded access to the nascent Internet in libraries and schools in the 1990s and establishing a peer-support program for laid-off workers.

“I think there’s a role for government and for the kinds of things that I’ve worked on,” she said.