Virginia photographer Bob Updegrove won the right to refuse to take pictures for same-sex weddings in a federal lawsuit settlement on Friday.

In 2020, the state enacted the Virginia Values Act which prohibited "discrimination on the basis of sexual orientation and gender identity in housing, public and private employment, public accommodations, and access to credit." Through the Christian legal advocacy group Alliance Defending Freedom, Updegrove filed a lawsuit to protect his freedom of speech.

Citing the recent 303 Creative LLC v. Elenis Supreme Court case, Updegrove's case was ultimately dismissed by both parties in appeals court on the agreement that he would not be forced to take part in same-sex weddings.

In a statement to Fox News Digital, Virginia Attorney General Jason Miyares said, "I promised to call balls and strikes and to follow the law wherever it leads. The Supreme Court made clear in 303 Creative that the government cannot compel people like Mr. Updegrove to speak contrary to their conscience."

Pride flag at SCOTUS

A federal law case was settled and will allow a Virginia photographer to reject requests to work for same-sex marriages. (Anna Moneymaker/Getty Images)

SUPREME COURT HEARS FREE SPEECH ARGUMENTS OVER COLORADO COMPANY REFUSING TO CREATE WEBSITES FOR GAY WEDDINGS

"As Attorney General, my highest duty is to the federal Constitution. I am pleased that with the settlement, the law is upheld at no cost to the taxpayers and Mr. Updegrove’s First Amendment rights are preserved," he added.

The attorney general, however, still maintains the authority to enforce the Virginia Values Act, including against Updegrove, based on conduct outside the complaint.

The Supreme Court case ruled in a 6-3 decision in June that a Colorado graphic designer who wants to make wedding websites could not be forced by the state to create them for same-sex marriages.

"In this case, Colorado seeks to force an individual to speak in ways that align with its views but defy her conscience about a matter of major significance," Justice Neil Gorsuch wrote in the majority opinion. "But, as this Court has long held, the opportunity to think for ourselves and to express those thoughts freely is among our most cherished liberties and part of what keeps our Republic strong."

Pride flag

The Virginia Values Act, passed in 2020, prohibits discrimination against gay or transgender people. (iStock)

Updegrove’s case was originally dismissed in 2021 under the grounds that he had "never previously engaged in the type of speech that he claims is currently being chilled." At the time, Mark Herring served as the Virginia attorney general.

BIDEN CAMPAIGN ATTACKS SPEAKER JOHNSON OVER VIEWS ON 'SAME-SEX RELATIONS,' IGNORES PRESIDENT'S PAST COMMENTS

In a press release, ADF counsel Johannes Widmalm-Delphonse said, "Free speech is for everyone. As the Supreme Court recently affirmed in 303 Creative, the government can’t force Americans to say things they don’t believe." 

A camera photographing an LGBT flag

Virginia photographer Bob Updegrove sued for his right to refuse to do work for same-sex weddings. (Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

"This victory for Bob underscores how the 303 Creative decision will protect countless Americans from government censorship and coercion. The U.S. Constitution protects his freedom to express his views as he continues to serve clients of all backgrounds and beliefs," the press release continued. 

For more Culture, Media, Education, Opinion, and channel coverage, visit foxnews.com/media.