WASHINGTON — President Barack Obama sought Thursday to advance the U.S. beyond the unrelenting war effort of the past dozen years, defining a narrower terror threat from smaller networks and homegrown extremists rather than the grandiose plots of Osama bin Laden’s al-Qaida.

In a lengthy address at the National Defense University, Obama defended his controversial drone-strikes program as a linchpin of the U.S. response to the evolving dangers. He also argued that changing threats require changes to the nation’s counterterrorism policies.

Obama implored Congress to close the much-maligned Guantanamo Bay detention center in Cuba and pledged to allow greater oversight of the drone program. But he plans to keep the most lethal efforts with the unmanned aircraft under the control of the CIA.

He offered his most vigorous public defense yet of drone strikes as legal, effective and necessary as terror threats progress.

“Neither I, nor any president, can promise the total defeat of terror,” Obama told his audience of students, national security and human rights experts and counterterror officials.

“What we can do — what we must do — is dismantle networks that pose a direct danger, and make it less likely for new groups to gain a foothold, all while maintaining the freedoms and ideals that we defend.”

Obama’s address came amid increased pressure from Congress on the drone program and the status of the Guantanamo prison.

A rare coalition of bipartisan lawmakers has pressed for more openness and more oversight of the highly secretive targeted strikes, while liberal lawmakers have pointed to a hunger strike at Guantanamo in pressing Obama to renew his stalled efforts to close the detention center.