ANNAPOLIS, Md. (AP) — Marvin Mandel, a former Maryland governor whose 26-year career in state government ended with his 1977 conviction on political corruption charges, has died. He was 95.

According to a statement from his family, Mandel passed away Sunday afternoon after spending two days with family in St. Mary's County celebrating the 50th birthday of his stepson Paul Dorsey. The cause of death is not yet known. "The First Lady and I send our deepest sympathies and condolences to the Mandel family and all those who loved and cared for him. The state of Maryland lost not only a former governor but also a truly great leader and someone countless people thought of as a friend, including myself," Gov. Larry Hogan said in a statement Sunday night.

Once considered one of Maryland's most powerful and effective governors, Mandel presided over a major reorganization of state government, built a subway in Baltimore and spent $1 billion on school construction.

But his accomplishments were overshadowed by his personal tribulations, which included his trial and a messy divorce when he moved out of the governor's mansion, leaving his first wife behind so he could marry another woman.

He was convicted in 1977 along with five co-defendants of mail fraud and racketeering. The charges stemmed from what prosecutors said was a complex scheme in which Mandel was given money and favors for vetoing one bill and signing another to help his friends make money on a horse racing track deal.

The conviction remained the dominant event of his career even after it was overturned on a technicality in 1987 because of a Supreme Court ruling in another case. Mandel, a Democrat, spent 19 months in federal prison until President Ronald Reagan commuted the sentence to time served in 1981. He steadfastly denied any wrongdoing and said he was vindicated when his conviction was overturned.

"I said then, and I say now, that I never did anything illegal as governor of Maryland," Mandel wrote in his 2010 book, "I'll Never Forget It: Memoirs of a Political Accident from East Baltimore." Attorneys have continued to argue about the case, decades after it faded from national headlines.

At a 2007 forum revisiting the case, Arnold Weiner, who was Mandel's lead attorney, said prosecutors were "thirsting for more blood" after prosecuting former Vice President Spiro Agnew, who resigned as vice president in October 1973 and pleaded no contest to one count of income tax evasion relating to his time as Maryland governor.

"The federal government made a number of efforts to try to criminalize what they couldn't prove as bribery ... but they couldn't prove bribery, so they brought this silly mail fraud case," Weiner said in 2007.

But prosecutors said the federal mail fraud charge was applicable to Mandel, because at the time it allowed prosecutions for people who defrauded someone out of property. They said property could include the honest and faithful services of a public official.

Barnet Skolnik, the lead prosecutor in Mandel's two trials, said Mandel was given more than $300,000 in value in the form of business interests, real estate deals and clothing in return for his influence to benefit secret owners of a Maryland racetrack with additional racing days.

"This was bribery," Skolnik said at the 2007 forum. "This was a huge, very complicated, very sophisticated and very, very well-hidden bribery." Before the charges were filed, Mandel was the undisputed top man in Maryland politics. He became governor on Jan. 7, 1969, when Agnew left to become vice president under President Richard M. Nixon.

Maryland had no lieutenant governor, and the constitution specified that the legislature would elect a new governor. As the powerful speaker of the House of Delegates, Mandel easily rounded up a majority of votes in the General Assembly. The experience made him decide that a lieutenant governor post was needed. He proposed a constitutional amendment creating the office and it passed.

In one of the biggest changes to state government under his tenure, Mandel created a cabinet system in the executive branch that streamlined 240 state agencies that reported to the governor. Mandel, a popular governor, was elected in 1970 and again in 1974 with about two-thirds of the vote each time. His popularity was undimmed by his divorce from his first wife, Barbara. Mandel announced through his press office on July 3, 1973, that he was leaving his wife of 32 years to marry the woman he loved, Jeanne Blackstone Dorsey.

"As (press secretary) Frank DeFilippo said when I gave him the statement and told him to take it down to the press, 'This is going to be the biggest explosion on July 4th they've ever had,'" Mandel recalled in his memoirs.

The first Mrs. Mandel refused to leave the governor's mansion, telling reporters she thought her husband had lost his mind. Mandel moved into a hotel room and then to an apartment while a settlement was negotiated.

Mandel married Dorsey 13 months later, just hours after his divorce became final. Dorsey died in 2001, after 27 years of marriage to Mandel. He had two children, a son Gary and a daughter Ellen, from his first marriage.