Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Supreme Court's legalizing of same-sex marriages not only paves the way for such unions in all 50 states, but also on all U.S. military bases.

Until Friday's ruling, the military permitted same-sex wedding ceremonies only on bases in states that allowed them. The high court's decision permits the ceremonies in military chapels across the country.

Todd Saunders and U.S. Army Captain Michael Potoczniak, partners of ten years, take their marriage oath at City Hall in San Francisco in 2013. Stephen Lam / REUTERS

Any military chaplain or clergy can refuse to perform a same sex marriage “if it is not in line with the tenets of their faith.” But same-sex couples are free to pick their own clergy member to perform their ceremony.

Same-sex marriage ceremonies have been taking place in military chapels since September 2013, when the Pentagon ruled that same sex partners of a service member were entitled to the same benefits provided to opposite sex couples, such as health care, access to military facilities and services on all military bases.

The decision came two years after the Pentagon lifted the "don't ask, don't tell" prohibition against openly gay men or women serving in the military.