Actor Kelsey Grammer has paid tribute to his Frasier co-star John Mahoney, who died this week aged 77.

Grammer posted a photo of him and his on-screen father on Twitter, writing: “He was my father. I loved him.”

Mahoney, who appeared in the long-running series as the lovable Martin Crane for 11 years, died in Chicago on Sunday.

He earned legions of fans and a Screen Actors Guild award for his portrayal of the cranky retired detective and army veteran Marty.

As well as his celebrated turn in Frasier, Mahoney also appeared in films including the Coen Brothers’ Barton Fink and performed as a voice actor and narrator.

He most recently appeared on TV screens in 2015, when he portrayed businessman Andrew Del Mar in an episode of ITV drama Foyle’s War.

The sitcom’s casting director, Jeff Greenberg, tweeted: “I’ve not known a kinder man nor more brilliant actor. We were all blessed to have spent 11 glorious years together.”

US actress Peri Gilpin, who appeared alongside him throughout Fasier’s 263 episodes, tweeted a picture of Mahoney singing at her wedding, adding: “Watch Moonstruck, Say Anything and/or Frasier or anything you can with him in it and raise a glass to John. Remember him well.”

Born in Blackpool in 1940 to a family evacuated from wartime Manchester, Mahoney later emigrated to the US where he was granted citizenship after service in the military, according to a biography on online entertainment database IMDb.

A latecomer to acting, he began learning his craft on stage aged 40 and won a Tony award for best featured actor in a play in 1986.