A majority of Republicans in a new Hill-HarrisX poll said that they believe the media treats elected officials fairly.

Fifty-eight percent of registered GOP voters said the press treats elected officials either “very fairly” or “somewhat fairly,” compared to 32 percent who said the media acts “somewhat unfairly” or “very unfairly” toward them.

Another 11 percent of those who identified as Republican said they were "unsure" one way or the other.

Democrats and independents largely sided with Republicans on the issue in the Hill-HarrisX survey.

Seventy-one percent of Democratic voters said that the media is fair in its treatment of public officials, as did 56 percent independent voters.

The news media has come under scrutiny in recent years.

According to a Gallup poll released in September, 41 percent of Americans said they have "a great deal" or "fair amount" of trust in mass media outlets to report the news. The finding represents a 4-percent-point dip since last year.

The new survey comes as politicians — including both Republicans and Democrats — continue to lash out at the media.

President Trump Donald John TrumpBiden says voters should choose who nominates Supreme Court justice Trump, Biden will not shake hands at first debate due to COVID-19 Pelosi: Trump Supreme Court pick 'threatens' Affordable Care Act MORE has repeatedly railed against the media, often referring to various outlets as “fake news.”

A number of 2020 White House hopefuls, meanwhile, have criticized the media over what they see as unfair coverage of their campaigns.

Former Housing and Urban Development Secretary Julian Castro Julian CastroSanders says Democrats should have given more speaking time to progressives Castro says DNC should have put more Latino speakers on stage from beginning Jill Biden defends husband's cognitive ability from Trump attacks: 'It's ridiculous' MORE on Tuesday slammed the media industry for holding Sen. Kamala Harris Kamala HarrisPelosi: Trump Supreme Court pick 'threatens' Affordable Care Act What Kamala Harris' VP nomination means to us Harris slams Trump's Supreme Court pick as an attempt to 'destroy the Affordable Care Act' MORE (D-Calif.) to a “different standard” following her exit from the Democratic presidential primary race.

The Hill-HarrisX poll surveyed 1,001 registered voters between Nov. 30-Dec. 1. It has a margin of error of 3.1 percentage points. Sampling error among partisan voters is higher.

—Tess Bonn