James Cayne, the cigar-puffing college dropout who parlayed a stint as a professional bridge player into a job as a bond broker on Wall Street, where he led Bear Stearns Cos. to record profits, then to the brink of collapse, has died. He was 87.

He died on Tuesday at Monmouth Medical Center in Long Branch, New Jersey, days after suffering a stroke, said his wife, Pat.

Until 2007, Cayne, known as Jimmy, was one of Wall Street’s brightest stars. Bear Stearns, the fifth-biggest U.S. securities firm by market value, had seen its profit surge 40% in fiscal 2006 to an all-time high of $2.1 billion, and Cayne — the longest-serving chief executive officer on Wall Street — had received $40 million in compensation.

By the end of 2007, Bear Stearns was staggering from losses in the U.S. subprime mortgage market and shareholders were pressuring Cayne to step down. The firm reported an $854 million fourth-quarter loss that year, the first quarterly deficit in its history.

On Jan. 8, 2008, Cayne ceded the CEO role to Alan Schwartz, a 30-year veteran at the firm, and stayed on as chairman. Two months later, the 85-year-old firm, on the brink of bankruptcy, was sold to JPMorgan Chase & Co. for $10 a share. The stock had traded at about $170 in January 2007.

The demise of Bear Stearns took a toll on Cayne’s image and legacy. His predecessor and mentor, Alan “Ace” Greenberg, blamed him for the firm’s collapse, describing Cayne as a “demagogue” and a megalomaniac more interested in playing bridge than in running the firm. Greenberg died in July 2014.

“The way he conducted himself during the crisis? Just horrible,” Greenberg said of Cayne in an interview with Bloomberg BusinessWeek in 2011. “He didn’t study the books, didn’t know what we owned, didn’t call people in and ask.”

The disrespect was mutual: There “isn’t anybody that will tell you he’s an honest guy,” Cayne said of Greenberg, according to William Cohan’s 2009 book “House of Cards.”

The crisis began in mid-2007 with the collapse of two Bear Stearns hedge funds that invested in securities tied to mortgages. The funds’ meltdown triggered re-pricing of mortgage-related securities that produced more than $1.7 trillion of losses at banks worldwide, according to data compiled by Bloomberg.

Throughout July 2007 — as the two hedge funds were careening toward collapse — Cayne spent 10 of the month’s 21 workdays out of the office, mostly on a golf course or playing bridge, the Wall Street Journal reported. When the firm ran out of money in March 2008 and faced a bank run from its hedge-fund clients and short-term creditors, Cayne, still the firm’s chairman, was at a bridge tournament in Detroit.

In an interview, Pat Cayne insisted Bear Stearns had kept her husband in the dark about its worsening finances during the final months of 2007. “He had no clue,” she said.

In 2010, Cayne told the Financial Crisis Inquiry Commission that the market’s “unjustified and irrational” loss of confidence in Bear Stearns had become “a self-fulfilling prophecy.” Still, when asked by the panel if he had made mistakes, he said: “I take responsibility for what happened. I’m not going to walk away from the responsibility.”

His own wealth was not spared. By the time he sold his 5.66 million Bear Stearns shares, in March 2008, they were worth $61 million — down from almost $1 billion a year earlier. He dropped off Forbes magazine’s annual lists of the world’s richest people, his net worth having peaked at an estimated $1.3 billion in 2007.

Cayne was born Feb. 14, 1934, in Evanston, Illinois, the only child of a patent lawyer, Maurice Cayne, and his wife, Jean, according to Cohan’s book. He studied engineering at Purdue University in West Lafayette, Indiana, intending to follow in his father’s footsteps.

He dropped out after three and a half years when he learned he would have to stay another year to retake a French class he had failed. After serving in the Army, he worked as a taxi driver in Chicago.

With his first wife, the former Maxine Kaplan, he moved to Salt Lake City to become a traveling copier salesman for American Photocopier Co., with a territory that stretched to Boise, Idaho.

“I averaged 95 miles per hour,” Cayne told Cohan. After he crashed his car into a telephone pole, a judge restricted him to daytime driving, cutting short his career as a traveling salesman. Back in Chicago, he became a salesman for his brother-in-law’s scrap-iron business, a job he managed to hold even after divorcing his wife.

In 1964, he moved to New York City to try his hand at the professional bridge circuit, finding some success but not enough to see a path to wealth. He landed a sales job at the municipal-bond brokerage Lebenthal & Co. and at a bridge tournament met the former Patricia Denner, whom he later married.

In 1969, seeking a new job opportunity on Wall Street, Cayne attracted the notice of Greenberg, the Bear Stearns boss who shared his passion for bridge. Tapping his bridge-playing network, Cayne quickly landed Loews Corp. co-founder Laurence Tisch as a client — stealing his account from Bear Stearns Managing Partner Salim L. “Cy” Lewis, according to Cohan.

Important clients such as Tisch “solidified Cayne’s reputation as a serious broker, and his political skills were soon driving him to the top of the firm,” Kate Kelly wrote in “Street Fighters,” her 2009 book about the last 72 hours of Bear Stearns.

In 1985 Cayne became president of Bear Stearns, the No. 2 job under Greenberg. He added the title of CEO in 1993 but didn’t ascend to the top position until Greenberg relinquished the title of chairman in 2001.

Cayne didn’t abandon card games when he became an executive. In 1992, when he opened the firm’s Beijing office, he played bridge with top Chinese government officials. As late as 2002, he was listed in bridge teams representing the U.S. in international tournaments.

With a card-player’s instincts, Cayne avoided risky bets and throwing good money after bad. Such was the case with Long-Term Capital Management, a hedge fund that almost collapsed in 1998 when it lost about $4 billion amid tumbling world markets. Bear Stearns had handled and processed the firm’s trades, and Cayne personally had invested $10 million.

When the Federal Reserve convened a meeting of Wall Street executives to orchestrate a bailout of the fund, Cayne refused to put up more of Bear Stearns’s money. Merrill Lynch & Co., Goldman Sachs Group Inc. and about a dozen other banks and financial firms later agreed to pump $3.65 billion into the fund to keep it afloat and prevent a meltdown in the broader financial markets.

When it was his firm’s turn on the precipice a decade later, in March 2008, Cayne again resisted conventional wisdom. Angry at the $2-per-share offer from JPMorgan CEO Jamie Dimon, which Dimon later raised to $10, Cayne for a time held out for bankruptcy as an alternative to the forced sale, according to the accounts by Cohan and Kelly.

Only when he confirmed that bankruptcy would put Bear Stearns’ 14,000 employees out of work immediately did Cayne grudgingly give in.

“It’s like you got a bad grade on your test,” he told Cohan. “That’s it. No appeal. This thing that you spent 40 years building, it’s over.”

In addition to his wife, survivors include their daughter, Alison, and her five children, and Cayne’s daughter from his first marriage, Jennice, and her two children.