The attack was repelled and only one aircraft was damaged, said an air force spokesman, adding that the Minhas air base at Kamra, in central Punjab province, did not house nuclear weapons.
"No air base is a nuclear air base in Pakistan," he said.
The gunbattle raged for hours, and eight militants and one soldier were killed, the spokesman said. Commandos were called in to reinforce and and police armoured personnel carriers could be seen heading into the base.
The attackers moved through a nearby village under cover of darkness and climbed 2.7m wall strung with barbed wire to break into the base. Some were wearing military uniforms.
The assault cast doubts over official assertions that military operations had severely weakened militants waging a violent campaign to topple the U.S.-backed government and impose strict Islamic rule.
Security forces opened fire when militants strapped with suicide bombing vests approached aircraft hangars, prompting other militants to fire rocket-propelled grenades from outside the base's walls, said the air force spokesman.
Base commander Air Commodore Muhammad Azam, who led the operation against the attackers, was shot in the shoulder, but is in stable condition, said spokesman Captain Tariq Mahmood.
Search operations for any other militants who may have been hiding in the complex after the attack had ended, he said.
Minhas, 75km northwest of Islamabad, is adjacent to the Pakistan Aeronautical Complex, a major air force research and development centre. Pakistan manufactures JF-17 fighter planes, jointly developed with China, at the site.
Suicide bombers launched attacks near the base and the aeronautical complex in 2007 and 2009, but news reports said defences were not breached.
It was not immediately clear how the attackers managed to enter the sprawling base this time. Although the attack took place at about 2am (local time) it is likely many of the soldiers on the base were awake for prayers or breakfast during the holy fasting month of Ramadan.
Faheemullah Khan, a civilian who lives near the base, said he was at a mosque praying when he heard gunfire and explosions which he thought were military exercises.
"Then we came to a restaurant, which is next to the main entrance to the base, and heard a louder explosion," he said.
"We saw six police vans rush in, and realised something was wrong."
Several squadrons of fighters and surveillance planes are believed to be based at Minhas.
"One body of a suicide bomber strapped with explosives has been found close to the impact area," said an air force statement.
Pakistan's Taliban movement has staged a number of high-profile attacks over the past few years, including one on army headquarters in Rawalpindi in 2009.
Last year, six Taliban gunmen attacked a naval base in Pakistan's biggest city Karachi to avenge the killing of Osama bin Laden. At least 10 military personnel were killed and 20 wounded in the 16-hour assault.
Those attacks, and the latest one, are embarrassing for Pakistan's military, which has ruled the country for more than half of its 65-year history and is seen as the most efficient state institution.
The Taliban, which is close to al Qaeda, is blamed for many of the suicide bombings across Pakistan, a strategic U.S. ally.
Pakistan's military, one of the biggest in the world, has staged several offensives against Taliban strongholds in the unruly tribal areas near the border with Afghanistan.
But the operations have failed to break the back of the Taliban. Major suicide bombings have eased considerably over the past year but that could be due to a tactical shift and not pressure from the military.