WASHINGTON (Reuters) - A high-profile legal fight involving a conservative Christian baker who refused to make a wedding cake for a gay couple promises to showcase the pivotal role Justice Anthony Kennedy will play on the U.S. Supreme Court during its new term that begins next week.

Baker Jack Phillips poses in his Masterpiece Cakeshop in Lakewood, Colorado U.S. September 21, 2017. Picture taken September 21, 2017. REUTERS/Rick Wilking

Kennedy, the longest-serving justice and at age 81 the second oldest, could provide the decisive vote in some of the term’s most consequential cases, also including a closely watched battle over political parties manipulating boundaries of electoral districts to tighten their grip on power.

For more than a decade, Kennedy has earned a reputation as the top U.S. court’s “swing” vote: a conservative willing in some major cases including gay rights and abortion to side with liberal justices. The court has a 5-4 conservative majority.

How the court rules on the baker case and others this term could help shape Kennedy's legacy even as some of his former law clerks have speculated he could retire next summer. (Graphics of 'The big cases' - tmsnrt.rs/2y3eCs6)

The Colorado baker case, likely to be heard by the justices in December, will force Kennedy to balance his strong support for gay rights - he authored the 2015 ruling legalizing same-sex marriage nationwide - with his advocacy for religious rights and free speech.

“This is a case where we are likely to have a court of one: Justice Kennedy,” said former U.S. solicitor general Greg Garre, who served as the Justice Department’s top lawyer before the Supreme Court under Republican former President George W. Bush.

The legal fight pits Jack Phillips, who runs the Masterpiece Cakeshop in the Denver area, against gay couple David Mullins and Charlie Craig. Phillips refused to make the couple a custom wedding cake in 2012, saying his Christian beliefs prevented him from taking any action that would be seen as an endorsement of gay marriage. Mullins and Craig filed a complaint with the state, accusing Phillips of violating Colorado’s anti-discrimination law.

The U.S. Constitution guarantees freedom of religion, and that issue is part of the case. But the core argument made by Phillips’ lawyers at the Alliance Defending Freedom, a conservative Christian legal advocacy group, involves the constitutional protection for freedom of expression.

The baker’s lawyers argue that making a custom cake is a form of creative expression akin to speech, and that his refusal to create one for the gay couple due to his religious beliefs should not be punished under anti-discrimination law.

‘RIGHT TO DISCRIMINATE’

“They are asking for a constitutional right to discriminate,” said American Civil Liberties Union lawyer Louise Melling, who represents the gay couple.

Slideshow ( 9 images )

The Colorado Civil Rights Commission found that Phillips had violated the state’s anti-discrimination law, a decision upheld in court on appeal.

The case puts Kennedy in a familiar position as the man likely to cast the deciding vote. The court’s four other conservatives are seen as likely to back the baker, while the four liberal justices are likely to back the gay couple.

Kennedy’s rulings on same-sex marriage and other issues have been critical in bolstering the U.S. gay rights movement.

Gay rights advocates therefore have some confidence that he might agree with them that bakers and other professions in which workers express themselves creatively should not be able to avoid sanctions under anti-discrimination laws.

But Kennedy also has been a defender of religious liberty and free speech. In the gay marriage ruling, Obergefell v. Hodges, he went out of his way to write that people opposed to same-sex marriage “reach that conclusion based on decent and honorable religious or philosophical premises, and neither they nor their beliefs are disparaged here.”

On other religious-conscience and free-speech issues, Kennedy has tended to agree with his fellow conservatives.

For example, he joined the other conservative justices in a 2014 ruling in favor of Christian-owned craft retailer Hobby Lobby in its refusal on religious grounds to provide health insurance for its employees that covers birth control for women.

On free speech, Kennedy authored the landmark 2010 ruling in the case Citizens United v. Federal Election Commision that allowed unlimited spending by corporations in U.S. elections, finding that limits on such spending would violate the free speech rights of entities like corporations and labor unions.

“He stands against the government telling Americans what they can and cannot say,” said Phillips’ lawyer, Kristen Waggoner.

A ruling in the baker case is due by the end of June.

The court opens its 2017-2018 term on Monday. On Tuesday, it is due to hear arguments in a case that could influence U.S. elections for decades.

It concerns whether state legislative districts drawn by Wisconsin’s Republican-controlled legislature were designed to benefit the party at the expense of Democratic voters to such a degree that it violated the U.S. Constitution’s guarantees of equal protection under the law and rights to freedom of expression and association.

Kennedy has served on the Supreme Court since 1988. Only 84-year-old liberal Justice Ruth Bader Ginsburg is older than him among the currently serving justices. Kennedy has been mum about whether he plans to retire.