Rep. Joyce Peppin, who as majority leader holds the second-most-powerful post in the state House, said Wednesday she is not running for re-election and will resign her seat.

Peppin, a Republican from Rogers, has served in the House since 2005 and was majority leader for the past four years. She is taking a position as director of government affairs and general counsel for the Minnesota Rural Electric Association and will step down July 2.

Peppin said she always intended for her work in the Legislature to be temporary and not a full-time job. However, she wasn't planning to leave the House quite yet and said she was ready to run for re-election as majority leader.

"This all happened within the last couple weeks. Sometimes you can't plan the timing the way you want," Peppin said of the job opportunity, which she said her husband came across recently. It matches her skills and interests, Peppin said.

As majority leader, Peppin was charged with managing the flow of legislation to the floor of the House during session. She served a key role in holding together the at-times fractious, ideologically mixed Republican caucus for four legislative sessions.

Corralling Republicans with varied views and reaching agreements with DFLers were her biggest challenges as majority leader, Peppin said.

During her time at the State Capitol, Peppin said she was particularly proud of getting financial relief for people hit by the 2006 Rogers tornado that damaged more than 200 homes, as well as helping pass a bill to allow construction of the Maple Grove Hospital.

And on Wednesday, Gov. Mark Dayton signed into law a public works bonding bill that included $13.5 million for a highway interchange in her district she has been pushing for since her first year in the House, Peppin said.

Peppin spent much of this year's session focused on changing how the House handles sexual harassment. She fought to broaden the legal standard of what is considered sexual harassment by removing the requirement that it be "severe and pervasive," but the change did not pass.

House Speaker Kurt Daudt, R-Crown, said in a statement that he is sad to see Peppin retire, calling her a friend.

"I applaud her work to rein in wasteful government spending and most recently, her groundbreaking effort to address sexual harassment in the workplace. As a team, we have accomplished a lot — lowering taxes, fixing roads and bridges and beginning to unravel the damage done by Obamacare," Daudt said.

Peppin was elected the same year as House Minority Leader Melissa Hortman, DFL-Brooklyn Park. Hortman called Peppin a "very hard-line conservative" and said they disagreed on almost every issue but always connected on a personal level.

"She knew how to disagree without being disagreeable, and she knew how to make the House a collegial workspace at times," Hortman said.

They worked together on sexual harassment legislation, and while they clashed over some elements of that issue, they both wanted to change the "severe and pervasive" standard.

"It was especially brave that she put that forward, and it was really nice to be working on an issue together," Hortman said.

Peppin said she tried to set aside her emotions when setting policy and focus on long-term impacts and unintended consequences of a bill.

"I truly gave a lot of thought to every piece of legislation and what the consequences would be if it either passed or didn't pass, and I really tried to be fair," she said.

Secretary of State Steve Simon, who was also elected to the House the same year as Peppin, served with her for 10 years. A DFLer, Simon was on the Government Operations and Elections Committee when Peppin chaired it. He described the committee as a "hotbed of controversy."

They battled over hot-button issues like a constitutional amendment that would require voters to show photo identification. Peppin was a "calming influence" during those fights, he said, and she even made a staffer use a stopwatch to ensure both sides got the exact same amount of time to state their case.

"It inspired confidence in her fairness, even when people were dead set against what she was doing," he said.

At her new job with the Maple Grove-based nonprofit, Peppin will advocate for and legally represent private electric utility businesses, which provide energy in rural and suburban communities across Minnesota.

Peppin said she does not expect House Republicans would fill the vacant majority leader post until shortly after the November election, when the party typically elects its leadership. A spokeswoman for the House GOP said it has not yet reached a decision on how to proceed.