ABC has once again had to deny claims that it canceled comedian Tim Allen's popular sitcom 'Last Man Standing' due to its conservative politics and humor.

Fans of the show - and Allen himself - were angered when ABC announced in May that one of its most-watched scripted series was being brought to an end after six seasons.

Allen's character, an outspoken conservative, echoed the political positions of the 64-year-old actor, a Republican who attended President Donald Trump's inauguration.

ABC Entertainment president Channing Dungey said on Sunday that politics had 'had absolutely nothing to do with' the cancellation of Tim Allen's show Last Man Standing

The cancellation sparked a firestorm of criticism on social media, with Allen tweeting that he had been 'stunned and blindsided' by Disney-owned ABC's decision

In a Halloween-themed episode of the show, Allen's character dressed up in a Trump costume. Another episode from the same season revolved around political correctness on college campuses.

'Politics had absolutely nothing to do with it,' ABC Entertainment president Channing Dungey told the Television Critics Association press tour in Los Angeles on Sunday.

In a Halloween-themed episode of the show, Allen's character dressed up in a Trump costume

'We have actors on our shows who have all sorts of political views. Tim Allen is a valuable part of the Disney family and has been for a very long time.'

She described 'Last Man Standing' as a 'high quality show' but added that the network had not been able to find room in the schedules for a seventh season.

The cancellation sparked a firestorm of criticism on social media, with Allen tweeting that he had been 'stunned and blindsided' by Disney-owned ABC's decision.

Meanwhile a petition on Change.org that attracted more than 300,000 signatures claimed the comedy was canceled because it was the only entertainment program that was not constantly shoving 'liberal ideals down the throats of the viewers.'

Dungey previously said the move to cancel the show was solely about ratings.

'A large part of these jobs are managing failure, and we have made the tough calls and canceled shows that we would otherwise love to stay on the air,' Dungey said.

The former Home Improvement star is one of the few outspoken Republicans in Hollywood and said that being a conservative in Hollywood is like living in the 1930s in Germany. He's pictured left with his wife Jane Hajduk, Trump and First Lady Melania Trump in 2005

'That's the job. I canceled Last Man Standing for the same business and scheduling reasons that I canceled Dr. Ken, The Real O'Neals, The Catch and American Crime.

'Last Man Standing was a challenging one for me because it was a steady performer in the ratings, but once we made the decision not to continue with comedies on Fridays, that was where we landed.'

Allen's show ranked No. 48 in viewership among broadcast shows this season, with an average of 5.89 million viewers

The show ranked No. 48 in viewership among broadcast shows this season, with an average of 5.89 million viewers, the Nielsen Co. said.

That's more viewers than some other ABC series that have been invited back, including Black-ish, Shark Tank and The Goldbergs, which just scored a two-year renewal for a fifth and sixth season.

Last Man Standing, which aired Friday at 8pm, was the second most watched comedy last season on ABC.

The only sitcom that drew more viewers was another ABC hit, Modern Family.

Last Man Standing was the third most watched scripted series on ABC behind Grey's Anatomy and Modern Family.

When it was announced that the sitcom would not return, Allen took to Twitter and said: 'Stunned and blindsided by the network I called home for the last six years.'

On the show, Allen portrayed a senior executive and director of marketing for an outdoor sporting goods chain.

The former Home Improvement star is one of the few outspoken Republicans in Hollywood and said that being a conservative in Hollywood is like living in the 1930s in Germany.

'You've gotta be real careful around here,' he said on Jimmy Kimmel Live.

'You get beat up if you don't believe what everybody believes. This is like '30s Germany. I don't know what happened.

'If you're not part of the group, you know, 'What we believe is right!' I go, 'Well I might have a problem with that.' I'm a comedian, I like going on both sides.'

Allen has long been friendly with Trump, having gone to his presidential inauguration in January and being pictured together at a banquet in 2005.

Conservative viewers claimed in May that it was Allen's remarks on Kimmel that led ABC not to renew the show for another season.

Some also speculated that the reason for the cancellation is that Robert Iger, the chairman and CEO of ABC's parent company, The Walt Disney Company, was mulling a run for president as a Democrat in 2020 earlier this year.

In March, Iger told The Hollywood Reporter that 'a lot of people' have been urging him to make a run for the Democratic Party's nomination.

The theory being bandied about in conservative circles online is that Iger wants to curry favor with liberals and shift programming on ABC leftward.