HARTFORD — Andrew J. McDonald had been overwhelmingly approved by lawmakers five years ago when he joined the Connecticut Supreme Court. Now he has returned to the State Legislature — this time nominated to be chief justice with the backing of much of the state’s legal establishment. He was put up for the job by a Democratic governor in a state where the party has dominated for years.

Still, his confirmation is anything but guaranteed and has devolved into a contentious partisan fight.

Justice McDonald is not the first Supreme Court nominee in Connecticut to face significant resistance in the State Legislature. But his nomination has become marked by an unusual level of acrimony. Stiff opposition from Republicans has imperiled his confirmation, while his supporters have mounted a robust effort that borrows from the tactics of political campaigns, even using robocalls and television advertisements to pressure lawmakers. (One commercial featured an image of President Trump and urged residents to call their legislator, saying, “You can stop this smear campaign now.”)

The battle, which has drawn widespread attention to what can often be a rather subdued process, has been described by legal experts as further evidence of politics seeping into the selection of judges across the country. The situation also reflects a fractured political climate in Connecticut, as Republicans, and even some Democrats, have become emboldened in challenging an unpopular governor, Dannel P. Malloy, who is in his last year in office.