The Supreme Court on Monday ruled against an American citizen who objected to the U.S. government's denial of a visa for her Afghan husband under a law giving consular officials wide discretion to bar people linked with "terrorist activities."

The court ruled 5-4 against Fauzia Din, a naturalized U.S. citizen from Afghanistan, by throwing out an appeals court ruling in her favor. Din, who lives in Fremont, California, sued the U.S. government after her husband, Afghan citizen Kanishka Berashk, was denied a visa in 2009.

The court was divided along ideological lines, with its five conservative justices in the majority in overturning the 2013 ruling by the San Francisco-based 9th U.S. Circuit Court of Appeals, which found that the government had not given a legitimate reason for denying the visa.

"I am terribly disappointed to hear the Supreme Court's decision. My husband and I did nothing wrong," Din, 45, said in a statement.

Din's lawyers believe the visa denial was related to the fact Berashk had worked as a payroll clerk for the Afghanistan government when it was controlled by the Taliban, an Islamist militant organization. Din sought asylum in the United States in 2000 after fleeing the Taliban in 1996. She married Berashk in 2006.

In preventing him from joining his wife in the United States, the government cited the law giving consular officials broad leeway to refuse visas to people linked with "terrorist activities." The government said it was not required to provide any more details on its decision. Din's husband remains in Afghanistan and has submitted a new visa application.

The court's five conservative justices were split in their rationale, with Antonin Scalia, John Roberts and Clarence Thomas saying Din did not have a constitutional right to challenge the visa denial decision.

Anthony Kennedy, joined by Samuel Alito, did not go so far, saying only that Din's due process rights were met by the government notice rejecting Berashk's visa application.

The government, Kennedy said, "satisfied any obligation it might have had to provide Din with a facially legitimate and bona fide reason for its action."

Chris Punongbayan, executive director of the Asian Law Caucus, which represented Din, said he was "surprised and disturbed by the Supreme Court's decision that an American citizen such as our client is not entitled to a reason when her spouse is denied a visa."

The case is Kerry v. Din, U.S. Supreme Court, No. 13-1402.