James J. Maguire flunked out of Niagara University, where he had received a scholarship to play basketball. He fared no better the first time he enrolled at what was then St. Joseph's College.

But when he returned to St. Joe's after serving in the Korean War, a professor diagnosed his problem: dyslexia. And that made all the difference. Maguire went on to a highly successful career in insurance.

"I have never forgotten that it was at St. Joseph's where people first believed in me," said Maguire, who founded Philadelphia Insurance Co.

On Wednesday, Maguire, 83, and his wife, Frances, 82, of Wyndmoor, gave $50 million to the Catholic university — the largest gift in the 166-year history of the school, which straddles City Avenue in Philadelphia and Lower Merion.

The university, with 8,415 undergraduate and graduate students, plans to bolster its endowment and increase scholarships. The gift also will support the university's risk and insurance management program, which Maguire initiated about a decade ago and which now will be coordinated by an academy that bears his name.

In addition, funds will be applied to leadership training for Catholic- and independent-school teachers. The gift is among the first to come into the school during the quiet phase of a capital campaign, which could reach a goal of several hundred million dollars by the time it is launched.

"This gift is going to do so many things for us," said Mark C. Reed, St. Joseph's president. "We're very, very grateful to the Maguires for their generosity and confidence."

James Maguire said he was pleased with Reed's leadership and direction for the university, which struggled with faculty unrest over management and financial concerns before he arrived.

He called Reed, a Philadelphia native and mathematician who became St. Joseph's first lay president two years ago, a welcome "change agent."

"Mark has a vision for where St. Joe's can go, and his vision is that he can take the university to the next level of excellence, and he feels the university is poised for that right now," Maguire said.

Born in Philadelphia and raised in Upstate New York, Maguire played basketball in high school and his team won the state championship his senior year, earning him the scholarship to Niagara.

"I could shoot from anyplace," he recalled.

But in academia, he wasn't so lucky. He lasted six months, and then tried St. Joe's and had trouble there, too.

"I was dyslexic and nobody knew it," he said.

Thirty days after he left St. Joe's, he was drafted and went to serve in the Korean War. When he returned in 1956, he reenrolled at St. Joe's, then eager to help those in the military, and "just by the grace of God" met the Rev. Hunter Guthrie, the Jesuit philosophy professor who discovered his condition.

"Changed my life," he said. "He helped me overcome my dyslexia."

Maguire became a strong student in accounting, statistics and actuarial science — all key to the insurance industry, he said. He graduated in two years, also taking classes at other universities.

He began his career as a salesman for Metropolitan Life Insurance Co., and went on to start the Maguire Insurance Agency and later Philadelphia Insurance Co., with nationwide offices. In 2008, the company merged with Tokio Marine Group, a Japanese firm, and Maguire sold his family's share in the business for $1 billion.

All the while, Maguire's relationship with St. Joseph's grew. He and his wife raised nine children, four of whom attended St. Joseph's, as have several grandchildren.

Philadelphia Insurance, where his eldest son serves as chairman, has hired dozens of students from St. Joseph's.

With the new gift, the Maguires have given St. Joseph's $75 million, including a $15 million gift in 2005 that led the school's effort to purchase the 36-acre former Episcopal Academy property, now known as the James J. Maguire '58 Campus.

He and his wife also started the Maguire Foundation. The Maguire Scholars Program provides more than 1,000 scholarships for students at elementary schools, high schools, and universities in the mid-Atlantic region. Twenty-five Maguire scholars are currently enrolled at St. Joseph's, and with the Maguires' gift, the university anticipates being able to expand the program to students from a broader geographic area, Reed said.

Reed recalled that Maguire asked him during his first year as president when he planned to ask for a gift.

"I told him I didn't think I had earned the right to ask for that level of support," Reed said. "I said, 'I'll be back before you know it.' "

With the university anticipating "a healthy operating surplus" in its $320 million budget, a stronger incoming freshman class academically and an endowment that has grown to $235 million, Reed said he felt ready to ask.

"The outlook for St. Joseph's University is very positive," he said. "Jim and Frannie Maguire have set the bar high for us all to follow, and I am so grateful to them for their past and present support and the impact they have made on our students, faculty, and campus."