Richard “Dick” Codey, a former acting governor of New Jersey and the state’s longest serving legislator, died Sunday at age 79, his wife confirmed to The Associated Press.

In a Facebook post on Codey’s official page, Codey’s family wrote that “Gov. Richard J. Codey passed away peacefully this morning at home, surrounded by family, after a brief illness,” and said “Our family has lost a beloved husband, father and grandfather — and New Jersey lost a remarkable public servant who touched the lives of all who knew him.”

Codey entered the New Jersey Assembly in 1974 and served there until he was elected to the state Senate in 1982, the AP reported. He later became Senate president, serving from 2002 to 2010.

Codey also served as acting governor twice, the AP said. He first assumed the role in 2002 after then-Gov. Christine Todd Whitman resigned to join President George W. Bush’s administration. He held the post again in 2004 for 14 months after Gov. Jim McGreevey resigned, when New Jersey law required the Senate president to take over if a vacancy occurred and to serve until the next election.

The AP reported that Codey returned to the acting governor role after Jon Corzine was incapacitated in April 2007 due to serious injuries he suffered in a car accident. Codey held the post for nearly a month before Corzine resumed his duties.

In the Legislature, Codey won strong praise in polls and, the AP said, gave serious consideration in 2005 to seeking the Democratic nomination for governor. He ultimately chose not to run when party leaders opted to back wealthy Wall Street executive Jon Corzine, who went on to win the office.

The AP said Codey was known for a feisty, “regular-guy” persona and championed mental health awareness and care issues. He also supported legislation to ban smoking from indoor areas and sought more funding for stem cell research.

After leaving the governor’s office, Codey returned to the Senate and published a memoir, the AP reported, describing decades of public service and including stories about his personal and family life.

The AP reported controversy in early 2005 involving Codey and his wife, Mary Jo Codey, as they spoke candidly about Mary Jo Codey’s past struggles with postpartum depression. The AP said the controversy began when a talk radio host jokingly criticized Mary Jo Codey’s mental health on the air; Codey confronted the host, according to the AP report, while the host said Codey threatened to “take him out,” a version Codey denied.

Mary Jo Codey told the AP that Codey was willing to support her speaking out about postpartum depression even if it cost him elected office. She said Codey told her, “He said, ‘If you want to do it, I don’t care if I get elected again.’”

In the same Facebook post, Codey’s family wrote that “He lived his life with humility, compassion and a deep sense of responsibility to others,” adding that “He made friends as easily with Presidents as he did with strangers in all-night diners.”