His colleague, Liu Boming, also briefly got his head out of the capsule to hand him the flag.
Mr Zhai wore a Chinese-made spacesuit thought to have cost between £5m and £20m ($10m-$40m) for the space walk.
The "yuhangyuan" (astronaut) was tethered to the capsule with an umbilical cable.
Mr Zhai retrieved an externally mounted experiment.
The third yuhangyuan on the mission is Jing Haipeng.
Leap
The Shenzhou VII capsule soared into orbit on a Long March II-F rocket from Jiuquan spaceport in north-west China on 25 September.
1958: Base for spaceflights built at Jiuquan, in Gobi desert
April 1970: China launches its first satellite into space
1990-2002: Shenzhou I-IV are launched to develop systems
Oct 2003: The first manned space mission launches on Shenzhou V
Oct 2005: The Shenzhou VI mission takes two men into space
Oct 2007: Chang'e-1 orbiter sent on unmanned mission to the Moon
The rocket put the Shenzhou capsule in a near-circular orbit more than 300km above the Earth.
Earlier, Zhang Jianqi, one of the chief engineers for China's space programme, said keeping three men in the spacecraft, and then sending one outside, would be a "big test".
"This is a big technological leap," he told state-run news agency Xinhua.
"The risks are quite high. Sending up three astronauts is a jump both in quantity and quality."
The ship is to release a 40kg (90lb) satellite which will circle the orbiter and beam back images to mission control.
At the end of the mission, the Shenzhou re-entry capsule will target a landing in north China's Inner Mongolia Autonomous Region.
China became only the third nation after the United States and Russia to independently put a man in space when Yang Liwei, another fighter pilot, went into orbit on the Shenzhou V mission in October 2003.
Two years later, Fei Junlong and Nie Haisheng completed a five-day flight on Shenzhou VI.
According to the Associated Press news agency, Xinhua posted an article on its website prior to the lift-off that was written as if Shenzhou VII had already been launched into space.
Advertisement
China's Shenzhou VII rocket blasts off
The article reportedly carried a date of 27 September and came complete with a dialogue between the astronauts.
Chinese media report that this latest mission is the "most critical step" in the country's "three-step" space programme.
These stages are: sending a human into orbit, docking spacecraft together to form a small laboratory and, ultimately, building a large space station.
The Shenzhou VIII and IX missions are expected to help set up a space laboratory complex in 2010.
China launched an unmanned Moon probe last year about one month after rival Japan blasted its own lunar orbiter into space.
SHENZHOU VII SPACECRAFT
1. Forward orbital module - crew live and work in this section, which contains scientific equipment. In future missions, this module may remain in orbit as part of a Chinese space station
2. Re-entry capsule - contains seats for three crew
3. Propulsion module - contains spacecraft's power unit and liquid fuel rocket system
4. Solar panels - spacecraft carries one pair of solar panels
5. Spacewalk - One yuhangyuan (astronaut) exits the orbital module on a tether. Another crew member stands just inside to assist in case of an emergency
Mr Obama said a $700bn (£380bn) package to rescue the US economy was the "final verdict" on eight years of Republican rule.
Mr McCain responded by accusing Mr Obama over his record on finance, saying he had asked for millions of dollars in so-called "earmarks" - money for pet projects - as an Illinois senator.
But both agreed the rescue deal would put massive pressure on the budget of the next president and mean spending cuts.
Senate majority leader Harry Reid said on Saturday morning that members of Congress had made significant progress in their negotiations on the bail-out plan and hoped to be able to announce an agreement in principle on Sunday.
'Piece in the puzzle'
Tens of millions of Americans watched the debate in Oxford, Mississippi, on TV, with only about five weeks to go before the 4 November election.
Last night, John McCain's silence on the middle class was deafening
Sen Joe Biden, Democratic vice-presidential candidate
A telephone poll by CNN and Opinion Research Corp afterwards found 51% said Mr Obama had won, to 38% for Mr McCain.
Obama was widely considered more intelligent, likable and in touch with peoples' problems, and by a slight margin was seen as the stronger leader and more sincere.
A CBS News poll of uncommitted voters meanwhile found that 39% gave Mr Obama victory, 24% thought John McCain had won, and 37% thought it was a dead heat.
Correspondents say this will be seen as an achievement by Mr Obama's team, as foreign policy and national security are considered his rival's strongest topics.
The Illinois senator's campaign manager, David Plouffe, said that the polls showed him making important gains with undecided voters.
Mr Obama was greeted by cheering supporters in Greensboro on Saturday
"We think it's another piece in the puzzle to Senator Obama winning the election," he said.
In a speech on Saturday in Greensboro, North Carolina, Mr Obama said the Republican candidate had proved he was out of touch with the middle class by never once uttering the words during their first debate.
"Through 90 minutes of debate, John McCain had a lot to say about me, but he didn't have anything to say about you," he said. "He didn't even say the words 'middle class.' He didn't even say the words 'working people."'
Mr Obama's running mate, Sen Joe Biden, echoed the comments, saying Mr McCain's judgement on every issue was "wrong".
"Last night, John McCain's silence on the middle class was deafening," he said. "We need more than a brave soldier. We need a wise leader."
The Republican governor of Mississippi, Haley Barbour, said Mr McCain's experience had shone through during the debate.
NEXT DEBATES
2 Oct - vice-presidential rivals. Topic: Domestic and foreign policy
7 Oct - presidential contenders. Topic: Any issues raised by members of the audience
15 Oct - presidential contenders. Topic: Domestic and economic policy
The BBC has full and extensive coverage of the debates
"This was real experience. This was someone talking about war, not what they read in a book, what they heard in a lecture," she told the BBC.
In its first post-debate advert, Mr McCain accused his rival of "playing politics, risking lives" when he voted against an Iraq war spending bill in May 2007.
On Friday, the Wall Street journal accidentally ran an advert from the McCain campaign before the debate - and even before he had said he would actually attend - declaring: "McCain wins debate".
The BBC's Allan Little in Oxford says both performances seemed to be sure footed, polished, coherent, focused, meticulously researched.
No-one rambled, nor repeated himself, our correspondent says. Both argued points of policy in detail and with mutual civility, he adds.
'Serious threat'
During Friday's debate, Sen McCain said he did not need "any on-the-job training".
"I'm ready to go at it right now," he added.
I have a long record and the American people know me very well
Sen John McCain
But Sen Obama said his rival had been "wrong" about invading Iraq and that the war had led the US to take its eye off the ball in Afghanistan, where it should have been pursuing al-Qaeda.
Mr McCain argued that as a result of the "surge" - which involved sending some 30,000 extra US troops to Iraq - US military strategy was succeeding.
"We are winning in Iraq and we will come home with victory and with honour," he said.
Asked about Iran, Mr McCain stressed that Tehran was a threat to the region and, through its interference in Iraq, to US troops deployed there.
He outlined a proposal for a "league of democracies" to push through painful sanctions against Tehran that were presently being blocked in bodies like the United Nations because of opposition from Russia.
Mr McCain also criticised Mr Obama for his previously stated willingness to hold talks with the leaders of Iran without preconditions.
John McCain and Barack Obama on dealing with Iran
Mr Obama rejected that criticism, saying he would reserve the right as president "to meet with anybody at a time and place of my choosing if I think it's going to keep America safe".
However, he said he agreed with his Republican rival that "we cannot tolerate a nuclear Iran" and the threat that that would pose to Israel, a staunch US ally.
Speaking about the so-called war on terror, Mr McCain said he believed the nation was safer than it had been the day after the 11 September 2001 terror attacks but there was still a long way to go.
Mr Obama pointed to the spread of al-Qaeda to some 60 countries and said that the US had to do more to combat that, including improving its own image as a "beacon of light" on rights.
"One of the things I intend to do as president is restore America's standing in the world," Mr Obama said.
Hollywood has been mourning the death of Oscar-winning film legend Paul Newman, who died of cancer aged 83.
Paul Newman's career spanned six decades and some 60 films
Tributes have been pouring in for the star of movies such as Butch Cassidy And The Sundance Kid and The Sting.
His co-star in both films, Robert Redford, said "I have lost a real friend" while Oscar-winner Kevin Spacey said Newman was a "great humble giant".
Former actor California Governor Arnold Schwarzenegger called him "a generous but modest philanthropist".
Former US president Bill Clinton and his wife Hillary described him as "an American icon, philanthropist and champion for children," in a statement.
Newman died at his Connecticut home on Friday.
A statement from Newman's family said: "His death was as private and discreet as the way he had lived his life."
SELECT FILMOGRAPHY
The Silver Chalice, 1955
Cat on a Hot Tin Roof, 1958
The Hustler, 1961
Hud, 1963
Cool Hand Luke, 1967 (pictured)
Rachel Rachel (director), 1968
Butch Cassidy and the Sundance Kid, 1969
The Sting, 1973
The Towering Inferno, 1974
Absence of Malice, 1981
The Verdict, 1982
The Color of Money, 1986
Nobody's Fool, 1994
Road to Perdition, 2002
Cars (voice), 2006
The star's five daughters praised their father's "selfless humility and generosity" in a statement released to the press.
"Paul Newman played many unforgettable roles," they said.
"But the ones for which he was proudest never had top billing on the marquee: Devoted husband, loving father, adoring grandfather, dedicated philanthropist."
In Los Angeles, flowers were placed on Newman's star on the Hollywood Walk of Fame as the Motion Picture Association of America hailed his "extraordinary career."
The actor starred in some 60 films in a career that spanned five decades.
He was nominated for an Academy Award 10 times - but it took him 33 years to win one, picking up the best actor trophy for The Color Of Money in 1987.
In May 2007, Newman said he was giving up acting because he could no longer perform to the best of his ability.
"I'm not able to work any more... at the level that I would want to," he told US broadcaster ABC.
"You start to lose your memory, you start to lose your confidence, you start to lose your invention.
Earlier this year, he pulled out of directing a stage production of John Steinbeck's Of Mice and Men in Connecticut because of unspecified health problems.
'Ego removed'
Eulogies for the star have poured in from friends and colleagues around the world.
Sam Mendes, who directed Newman in 2002's Road To Perdition, said the actor was "an extraordinary man in every respect".
The thing I remember the most about him is his total lack of ego and his lack of entourage and his lack of hangers-on."
Advertisement
Some of Paul Newman's iconic performances - courtesy 20th Century Fox and Warner Bros
Film star George Clooney said: "He set the bar too high for the rest of us. Not just actors, but all of us."
Kevin Spacey added: "He used his success to help others and did it without wanting a lot of credit.
"He should be an example to everyone in the acting profession because he seemed to have had his ego surgically removed."
Hit films
Although his handsome looks and piercing blue eyes made him an ideal romantic lead, Newman often played rebels, tough guys and losers.
"I was always a character actor," he once said. "I just looked like Little Red Riding Hood."
His movies included Cat On A Hot Tin Roof, The Hustler, The Sting and Hud.
Along the way, he worked with some of the biggest names in Hollywood - including Alfred Hitchcock, Robert Altman, Martin Scorsese, Elizabeth Taylor, Lauren Bacall and Tom Hanks.
He also appeared with his wife, Joanne Woodward, in several films including Long Hot Summer and Paris Blues. The star later directed his wife in movies such as Rachel, Rachel and The Glass Menagerie.
But his most famous screen partner was undoubtedly Robert Redford, his sidekick in both Butch Cassidy and The Sting.
In addition to his Academy Award for best actor, he was given an honorary Oscar in 1986 "in recognition of his many and memorable compelling screen performances and for his personal integrity and dedication to his craft".
YOUR MEMORIES
His humour, charm, cleverness and above all his humanity could never be copied
In 1994, he picked up a third Oscar, the Jean Hersholt Humanitarian Award, for his charitable work.
His philanthropic efforts included the establishment of summer camps for children who suffered from life-threatening illnesses.
He also donated profits from his Newman's Own food range to a number of charitable organisations.
Newman's last film role was as the voice of Doc Hudson, one of the most famous racing cars in history, in the Pixar animation Cars.
It was perhaps a fitting epitaph for the actor, who had a lifelong fascination with the sport - and put his film career on hold in the 1970s to become a professional racing driver.
He is survived by his wife, five children, two grandsons and his older brother Arthur.
Astana team leader Alberto Contador has admitted Lance Armstrong's arrival may force him to move to a rival outfit.
Contador is among an elite group to win all three major tours
Armstrong came out of retirement to work with Johan Bruyneel, the man who coached him to his record seven Tour de France victories, at Astana.
But neither Armstrong nor Contador, who won the 2007 Tour, are likely to be happy for anything other than team leader status.
"If I am not happy I will change teams," said Contador.
When news of Armstrong's surprise return to the sport broke earlier this month, Contador said he would "welcome him with open arms".
But that stance seems to have changed after Armstrong officially signed with Astana.
"The team has said it has complete confidence in me, but this is a particular situation and I will have to see what happens in the coming weeks to then decide what is best for my future," said Contador.
"Four weeks from now the situation could be completely different.
"I spoke with Johan about the Tour next year and he said there is no problem and that I will be the leader, but Lance Armstrong is a champion and I think he will want to race to win.
"I am sure that he also wants to be the leader of the team."
The 25-year-old, who won the Tour of Spain and the Giro d'Italia this year, is contracted to Astana until 2010.
"I respect Armstrong. He has done incredible things, but I don't think that I have to prove to anybody that I should be the leader," said Contador.
"I want to be sure the team guarantees that I will be in the Tour as the team leader."
Armstrong has acknowledged Contador as "the best rider on the planet right now".
"We have to understand that and respect that," said Armstrong.
"I'm not sure I can ride that fast right now. I hope it works out."
One rider who believes there could be problems for the Astana team is the Republic of Ireland's 1987 Tour winner Stephen Roche.
"I could see (Contador) walking away. He's finally getting credibility and now next year everybody will be talking about Armstrong," Roche told BBC Radio 5 Live.
:China's three astronauts spent their first day in orbit on Friday spoilt with a spicy 80-dish menu as they prepared for the most dangerous part of their mission -- the nation's first space walk.
The voyage of the Shenzhou VII, China's third manned foray into space, has proceeded without a glitch since it blasted off from Jiuquan Satellite Launch Centre in northwest China late Thursday, state media said.
"We feel physically sound," the trio, led by Zhai Zhigang, reported back to ground control after blast-off, Xinhua news agency reported.
At 4:04 am (2004 GMT Thursday) the Shenzhou VII entered into a round orbit around Earth from its initial oval orbit, a complicated manoeuvre which makes it possible for the three to get down to the real business of the journey.
The three spent most of the day assembling and testing the space suit that one of the astronauts -- most likely 41-year-old Zhai -- was to put on for an unprecedented walk in space scheduled for Saturday, Xinhua said.
Zhang Jianqi, one of the chief engineers for China's space programme, said keeping three men in the spacecraft, and then sending one outside, would be a "big test".
"This is a big technological leap," he told Xinhua. "The risks are quite high. Sending up three astronauts is a jump both in quantity and quality."
Space motion sickness can cause dizziness, vomiting and nausea, and in severe cases, astronauts might feel severe pain in the joints, have breathing difficulty or could even lose consciousness.
"Some of these can be life-threatening," said Li Yongzhi, director of the medical department of the China Astronaut Research and Training Center, according to the China Daily newspaper.
While crammed into a tiny living space, the three astronauts will at least be able to enjoy a hitherto unseen choice of food.
The menu includes spicy chicken with peanuts, shrimps and dry fruits -- 80 items in all, up from only 50-odd in China's last mission in space three years ago.
"We have tried to make them taste like stir-fried dishes they have on Earth," Chen Bin, who is in charge of food for the astronauts, told Xinhua.
In choosing food fit for space, Chen said he had avoided ingredients that produce gas after being digested, such as milk and soybean. "Meat and egg are better," he said.
The astronauts will also take a traditional Chinese medicine -- "taikong yangxin", or "space heart-nourisher" -- during their time in orbit to treat space motion sickness, Xinhua said.
"It is made of more than ten types of Chinese herbs, and has proven to be effective in improving the astronauts' cardiovascular conditions," the medical department's Li said.
Chinese state media has treated the journey as a major national triumph, coming just a month after the Olympics, but in at least one case got ahead of itself.
On Thursday morning -- hours ahead of blast-off -- Xinhua posted a story on its website reporting how the Shenzhou capsule was being successfully tracked high over the Pacific Ocean.
The story, dated September 27 and including supposed dialogue, was written from one of the numerous tracking ships China's space programme sends around the world to follow space flights.
It described in a vivid, blow-by-blow account how the spacecraft's signals were being monitored.
"Pressure in the cabin is normal. Oxygen pressure in the cabin is normal," an astronaut was quoted as reporting.
"There was a technical problem. We dealt with it after we had found it," an editor at Xinhua told AFP when asked about the story.
China sent its first man into space in 2003, followed by a two-man mission in 2005.
The Shenzhou VII is scheduled to land in the northern Inner Mongolia region after the 68-hour mission is completed.
Pakistani troops have killed 1,000 Islamist militants in a huge offensive in the Bajaur tribal district over the last month, the army says.
Pakistani troops have been battling Taleban fighters near the border
It says that it will regain control of the region from Taleban and al-Qaeda militants within the next three months.
The army says that five top militants were among those killed in the Bajaur operation. The area is one of the most unstable of Pakistan's tribal areas.
There has been no word from militants in relation to the army's claims.
"This is one area that, if you are controlling, can create a much greater effect on the entire region," Maj-Gen Tariq Khan told reporters on a visit to the area arranged by the army.
He estimated that 65% of the militant problem would be eliminated if militants were defeated in Bajaur.
"If they lose here, they've lost almost everything," he added.
"If we do not take any action it will become an independent agency spreading out terror in all directions."
'Al-Qaeda sanctuary'
Maj-Gen Khan said that 27 soldiers had been killed and 111 wounded in the operation, launched last month at the same time as Pakistan's new government was coming under increasing pressure from the US to take action against militants in its border regions.
The army says that many suspected militants have been captured
Correspondents say that there is no way independently to verify the army's claims.
However the BBC's M Ilyas Khan in Pakistan says that troops are barely making progress against militants and thousands of people have been displaced.
Our correspondent says that soldiers in Bajaur are not confronted with guerrilla-type attacks or suicide bombings but a situation of conventional warfare in which the militants continue to hold a large swathe of territory.
Maj-Gen Khan said the dead militant commanders were from Egypt, Uzbekistan and Afghanistan. Another was described as an Arab while the fifth was a Pakistani commander named only as Abdullah.
Bajaur is long believed to have been the most likely al-Qaeda sanctuary inside the Pakistani border region, and has been the target of several suspected US missile attacks since 2006.
It borders the troubled Afghan province of Kunar, scene of some of the fiercest fighting between Pakistani forces and Islamist militants since Islamabad joined the US-led "war on terror" in 2001.
It was also the scene of a missile strike that is believed narrowly to have missed Osama bin Laden's number two, Ayman al-Zawahiri, in January 2006.
A bird that swooped over the waters covering what is now southeast England had wings that spanned five metres (16.25 feet) tip to tip and had bony teeth with which to grab its food, a study published on Friday said.
The extraordinary beast has been identified thanks to a well-preserved skull unearthed on the Isle of Sheppey, east of London. Named Dasornis emuinus, it has been dated to 50 million years ago.
Gerald Mayr of Germany's Senckenberg Research Institute said Dasornis was "like an ocean-going goose, almost the size of a small plane."
"By today's standards, these were pretty bizarre animals, but perhaps the strangest thing about them is that they had sharp, tooth-like projections along the cutting edges of the beak," he said.
Like all birds, Dasornis did not have real teeth, which are made of enamel and dentine.
Instead, it had bony "pseudo-teeth," a feature unique to a group of now-extinct giant birds called Pelagornithids.
The spikes were handy for Dasornis, enabling it to snap up fish and squid while it swooped over the sea, suggests Mayr.
"With only an ordinary beak, these would have been difficult to keep hold of, and the pseudo-teeth evolved to prevent meals slipping away."
The find is reported in a British journal, Palaeontology, published by the Palaeontological Association.