WASHINGTON — Republicans accused Twitter of being biased against conservatives on Wednesday, drawing rebukes from Democrats in a congressional hearing that illustrated how partisan lines are increasingly being drawn on social media.

The sparring focused on the testimony of Jack Dorsey, Twitter’s chief executive, who repeatedly denied the accusations during a hearing before the House Energy and Commerce Committee. Republicans grilled Mr. Dorsey, suggesting that Twitter’s algorithms suppress conservative viewpoints and discriminate against Republican voices.

Representative Mike Doyle, a Democrat of Pennsylvania, accused Republicans of sounding the alarm of bias for political gain. The idea that social media services exhibit a partisan slant, Mr. Doyle said, was a “load of crap.”

Yet the notion that social media companies might be intentionally choosing what political content to display was also pushed by the Trump Administration. Before the afternoon hearing, the Justice Department said Attorney General Jeff Sessions planned to hold a meeting with state attorneys general this month to examine how social media companies “may be hurting competition and intentionally stifling the free exchange of ideas on their platforms.”