Phoenix, Arizona (CNN) - An attorney for a Phoenix police officer challenging the state's new immigration law argued in court Thursday that his client could be fired or disciplined if he doesn't enforce the law.
Stephen Montoya countered the state's position that Officer David Salgado can't prove he will be harmed because the law has not yet taken effect.
U.S. District Judge Susan Bolton heard the motions from Salgado and attorneys representing Gov. Jan Brewer, who wants Salgado's case dismissed. Bolton took the case, the first challenge to have a hearing, under advisement.
Thursday's arguments in a standing-room-only courtroom set the table for the much-anticipated July 22 hearing at which the Obama administration will argue the law is unconstitutional.
Protesters on both side of the issues assembled peacefully outside the federal courthouse.
Attorney John Bouma, representing Brewer, argued that Salgado has no standing in the case and that the governor is protected by immunity. Montoya said the governor is only being sued in her official capacity - not as a private individual.
The officer has argued that he could violate civil rights in carrying out the law and could be accused of profiling. Montoya also says Salgado could be sued by private individuals if he doesn't enforce the provisions. Montoya said the Arizona law puts local and state officers in a difficult position because they have to violate federal law to enforce the state law.
Brewer argues that the state is just trying to enforce current immigration laws.
This is the first of seven legal challenges to Arizona's controversial immigration law. The Justice Department has also filed a suit to stop it.
Salgado contends that the new law violates the Constitution along with some state and federal laws.
The law, signed by Brewer in April, requires police to question people about their status if they have been detained for another reason and if there's reason to suspect they're in the United States illegally. It also targets those who hire illegal immigrant laborers or knowingly transport them.
Critics have said the law will promote racial profiling. Supporters of the bill say its aim is only to enforce federal law.
Salgado is asking the judge to block the law before it goes into effect in July 29.
- CNN's Thelma Gutierrez contributed to this article.