The Republican Party, broadly speaking, is comprised of many factions that are often at odds with one another. Prominent examples are the battles between the grassroots and the national party establishment and between defense hawks and non-interventionists.

Perhaps fiercer than any of these fights is the long-standing conflict between social conservatives and libertarians. But when the Supreme Court legalized same-sex marriage last month, they created an opening for a wedding between these two groups, which could benefit the Republican Party ahead of the 2016 election.

To be clear, libertarians come in many stripes. There are those who reject the political system, those who ally themselves with the Libertarian Party itself, some who are working to change the Republican Party from within, and those who would only consider voting for a Republican candidate under certain circumstances.

Historically, during the Cold War, the common enemy of communism helped foster unity among libertarians and conservatives. Once the Soviet Union collapsed, however, this unifying purpose went away.

During the George W. Bush years, libertarians and conservatives drifted further apart, for two main reasons. One was that the dominant issue became the War on Terror, and libertarians tended to be more critical of the war effort and nervous about the threat it posed to civil liberties. The other split was the emergence of the gay marriage debate. In 2008, a number of libertarians felt they had more in common with Barack Obama than the Republican ticket.

Once President Obama took office, however, this began to change. Obama's pushes for economic stimulus spending, national healthcare, oppressive pro-union labor rules and aggressive environmental regulations allied libertarians and conservatives, helping to fuel the rise of the Tea Party.

Gay marriage, however, continued to be divisive. To libertarians, the idea that the government would try to tell individuals who were in love with one another who they could or couldn't marry was unconscionable. Republican opposition to gay marriage was a deal-breaker for these folks.

But as the dust settles on the Supreme Court decision legalizing gay marriage, it's becoming clearer that the debate over the issue is going to shift to one of religious freedom. And on that issue, there's much more of an opening for libertarians and social conservatives to get along.

At the core of libertarianism is the believe that people should be able to do whatever they want short of using force or coercion on somebody else. It makes sense why libertarians wouldn't oppose gay marriage, for the reason that two men or women getting married doesn't injure anybody else.

But with gay marriage legal, the cultural debate has been moving to issues such as: Should a religiously observant baker or photographer be forced to participate in gay weddings? Or, should a Catholic Church be forced to perform gay marriages?

Whatever their differences on the underlying issue of homosexuality and gay marriage, it will be hard for many libertarians to justify any sort of government coercion forcing individuals to violate their deeply held beliefs. As a result, they'll find themselves increasingly — and begrudgingly — on the same side as social conservatives on many of the looming debates.

What this means for the Republican Party in 2016 depends in large part on how candidates campaign on the issue once the debate moves beyond the stage of the initial reactions. The most unifying message for Republican candidates would be: Whatever your views on same-sex marriage, government shouldn't prevent individuals from living their lives in accordance with their values.

This is a message that should wed social conservatives and libertarians.