Rick Freeman, a congenial editor whose sense of humor made him a welcome tone setter in a veteran newsroom during his 15 years with the New York sports department of The Associated Press, has died. He was 40.

Aino Wheler, Freeman’s wife, said he died of brain cancer Thursday in Cleveland, shortly after he had been diagnosed with an aggressive tumor known as a glioblastoma.

A 1999 graduate of the University of Michigan, Freeman joined the AP in 2001 and became a valued member of the sports desk, capable of handling just about any editing shift on the department’s schedule.

“Rick was a smart, flexible journalist and incredible team player for AP Sports,” said Michael Giarrusso, the AP’s global sports editor. “He was comfortable on almost any assignment and any sport, and he brought a particular expertise and passion to our Big Ten coverage. He was the first person to volunteer to handle additional assignments when a colleague was ill or had an emergency. He was friendly and easygoing in what can be a stressful, deadline-driven environment. That attitude earned him friends in AP bureaus all around the world.”

Freeman’s versatility also served him well as a reporter. He wrote about everything from college basketball to horse racing and covered events like the NFL draft and the Heisman Trophy presentation.

But his duties largely involved editing, and that role — helping others improve their work — became a source of great pride.

“Rick was always a voice of calm and professionalism on tight hoops and football deadlines,” said Betsy Blaney, who covered sports for the AP in Lubbock, Texas, and is now with Texas Tech Public Radio. “Truly one of the nicest on the sports desk I ever worked with.”

Freeman’s often-disheveled look was part of his charm and fit his personality — he could find humor in his own quirks and those of the world around him. He rarely let a good distraction go unnoticed — or uncommented on.

Ralph D. Russo, now a national college football writer for the AP, spent many a day and night sitting across from Freeman.

“It was often the most enjoyable part of the desk shift. He was the best audience, because he loved to laugh and joke. We would volley one-liners and sarcastic cracks about sports and journalism and living in New York City back and forth,” Russo said. “He was a bundle of hyperactive energy. His passion about journalism was so admirable. His cynical passion for Cleveland sports and Michigan football was so fun. And he really cared for people.”

Freeman’s relationships with co-workers often morphed into lasting friendships away from the office, whether he was enjoying a drink at Lansdowne Road in Manhattan, rocking out to Bruce Springsteen at the Meadowlands or agonizing — with a sense of humor, of course — over the foibles of those star-crossed teams from the Cleveland area where he grew up. He twice ran the New York City Marathon.

After leaving the AP to take a job at Al-Jazeera America, Freeman played an active organizing role when workers there voted to unionize in 2015. Earlier this year, he was hired by the News Media Guild as a mobilizer, and he remained in touch with leadership even following his diagnosis around the beginning of August.

“He texted me Aug. 12, during the Guild’s sectional in Washington, D.C., to find out how things were going,” said NMG president Martha Waggoner, an AP reporter in Raleigh, North Carolina. “He was supposed to lead the mobilizing training but had to drop out. I asked how he was doing and he responded: ‘I’m pretty OK, considering. Just wish I could be helping more.’

“And that sums up Rick.”

Freeman is survived by Wheler, parents Richard and Barbara Freeman, and sister Ellen Freeman Kraatz.