Ibrahim Hamed emerged from the building before dawn and troops told him over a loudspeaker to strip to his underwear, witnesses said. Hamed complied, was cuffed and taken to a nearby building. Army officials said Hamed was armed and alone at the time of his capture.
The army said Hamed, 41, masterminded attacks that killed 78 Israelis and wounded hundreds.
Hamed has been on Israel's wanted list since 1998, frequently evading capture. Hamed, a university graduate and influential leader, became the West Bank's commander of Izzedine al Qassam, the Hamas military wing, in December 2003.
Before dawn Tuesday, a dozen jeeps and two armored personnel carriers surrounded his hideout, an apartment building in downtown Ramallah, just 200 yards from the home of Palestinian President Mahmoud Abbas.
Mohammed Azzam, 48, said he watched the arrest from his balcony facing the two-story building where Hamed was holed up. He said an army bulldozer rammed the door to the hideout, which consisted of two apartments over shops on the ground floor.
Using a loudspeaker, troops then called out Hamed's name in Arabic. They told Hamed they would demolish the building with him inside if he didn't surrender, Azzam said.
After Hamed was arrested, having removed his shirt and pants, soldiers entered the building and blew out doors and windows, as a robot searched for explosives.
The two apartments were sparsely furnished with bamboo chairs and mattresses. A reporter touring the hideout saw two copies of Newsweek magazine on the floor.
Palestinian militants surrendering to troops are routinely asked to strip to ensure they don't carry explosives.
The Israeli army said Hamed "masterminded some of the most deadly terror attacks against Israel in recent years," including suicide bombings at the Hebrew University of Jerusalem, an outdoor cafe in Jerusalem and a pool hall in central Israel. Hamas has observed an informal truce with Israel since February 2005.
For some time, Hamed was held in a Palestinian jail for involvement in the Hamas military wing, but was released in 2002, during a major Israeli military offensive in the West Bank. Hamed graduated from the West Bank's Bir Zeit University in 1993, with degrees in history and political science, his nephew Ayman said.
Hamed grew up in the West Bank village of Silwad, and belongs to the same clan as Khaled Mashaal, the top Hamas leader based in Damascus.