WASHINGTON

PRESIDENT OBAMA has been re-elected. He must now decide how to balance his commitment to human rights against the political risks of appearing “soft on terrorism.”

The president’s critics on the left must accept that he has fundamentally altered the George W. Bush -era human rights landscape: he ended torture and released the torture memos. He closed the C.I.A. ’s secret prisons. He has constrained his own authority, accepting the binding effect of international law and rejecting his predecessor’s overly broad theory of executive power. And he tried to close the detention camp at Guantánamo Bay and move trials from military tribunals into civilian courts.

Yet when it comes to human rights and security, Mr. Obama has become trapped by his instinctive distaste for political combat. He backed off, under pressure, from his pledge to close Guantánamo. He allowed Congress to obstruct his plans to move detainees to the United States , even when their innocence was beyond doubt. He reversed himself on trying terror suspects in civilian courts. He embraced the principle of indefinite detention without trial, albeit with enhanced procedural safeguards. And he expanded the use of drone strikes, including the targeted killing of American citizens, without accountability or oversight.

This is not “Bush Lite,” but nor is it consistent with the ideals that inspired so much idealism in 2008. If Mr. Obama is serious about demonstrating that “the choice between our safety and our ideals” is a false one, as he declared in his 2009 inaugural address, he needs to move forcefully in four critical areas.

First, he must release certain Guantánamo detainees, who have never been charged or tried. Of the 166 detainees still incarcerated there, 86 have been cleared for release because they clearly pose no threat to America. Congress has passed laws to stop the admission of Guantánamo detainees to the United States. But the executive branch has the power to admit individuals to the country and to transfer suspects for trial. And the Department of Justice controls sufficient portions of its own budget that could be used if Congress refused to pay for transfers. It’s time for Mr. Obama to stare down the fearmongers and release these people into the United States or other countries that will accept them.

Second, the United States should try the remaining Guantánamo detainees in civilian courts. There are undoubtedly some bad people at Guantánamo, and we should marshal all legally obtained evidence and put them on trial. The Bush administration fouled its own legal nest through torture, but there is admissible evidence in most cases, and civilian courts have ample experience and tested procedures in prosecuting terrorists. The panic and pandering that caused Attorney General Eric H. Holder Jr. to reverse his decision to try Khalid Shaikh Mohammed in New York should not be tolerated in Mr. Obama’s second term.

Third, the United States should end indefinite detention without trial. Under the laws of war, the right to detain enemy combatants ends when the war ends. The Iraq war ended last year and the Afghan war will likely end in 2014. Unless Mr. Obama wants to assert the untenable position that the war on terror or the war on Al Qaeda continue everywhere and indefinitely, then the legal basis for further indefinite detention will end. Detainees must be tried or released. There is a risk that released detainees could plot against us after returning home. But America has mind-boggling technological, military and diplomatic resources to monitor and intercept the communications of those who threaten us. We simply can’t hold people indefinitely without charge under a theory of permanent war.

Finally, Mr. Obama must bring drones under the rule of law. The problem isn’t that he can’t be trusted to make careful decisions. By all accounts, he conducts painstaking reviews to ensure that the targets pose genuine threats and the risks of collateral damage are low. But it is unacceptable that these decisions are made without public accountability or oversight and that American citizens, like the Yemeni-American cleric Anwar al-Awlaki , have been deprived of their lives without being afforded due process.

The president should apply for authority to a secure United States District Court for a warrant before undertaking any attacks on American citizens, articulate clear criteria for ordering drone strikes that can be debated and challenged by Congress or courts, and disclose strikes after they occur (while protecting key national security sources).

On Jan. 20, 2017, Mr. Obama will leave office. Will there still be men at Guantánamo detained without charge, or will that stain on our democracy have been lifted? Will terrorism prosecutions be conducted in federal courts before life-tenured judges or in an untested system staffed by military officers? Will American citizens know what military operations are being conducted in their name, or will drone strikes remain shrouded in unaccountable secrecy?

Mr. Obama now has the power and the ability to keep this country safe without fundamentally threatening the rule of law. He must demonstrate that he also has the political will to do so.

Eric L. Lewis is a partner at the law firm Lewis Baach.