There was excitement as the first serving American president to visit Wales dropped in on a suburban primary school – but also tension, with protesters gathering ahead of a march on the Nato summit.

Crowds lined the streets to watch Barack Obama's 20-strong cavalcade sweep into Mount Pleasant school, just north of Newport city centre.

Meanwhile, anti-war protesters were meeting at the cenotaph in the centre of Newport, intending to get as close as they could to the Celtic Manor resort, where the summit is being held, to express their distaste at what they see as Nato's global aggression.

Most schools in Newport are closed to try to reduce traffic on the roads around Celtic Manor. However, Mount Pleasant remained open after one of its school governors, Stephen Bowen, wrote a hopeful letter to the American embassy, asking if the president would care to visit.

David Cameron and Barack Obama at Mount Pleasant Primary School. Photograph: Saul Loeb/AFP/Getty Images

He was as surprised as anyone when the White House agreed. Crowds, some waving US flags, lined the streets to catch a glimpse of the president arriving with the prime minister, David Cameron.

"It's not every day a world leader arrives in south Wales," said Ann Lock, who had dug out a stars and stripes for the occasion. "I think it's good for Wales and good for Newport."

Daniel Rees, five, had prepared a poster welcoming Obama – in English and Welsh. His grandfather, Bryn Lewis, said: "Newport has been struggling a bit economically. This has all got to be good PR for the place. It might give us all a little boost."

Chris and Bronwen Green said they were Obama fans. Chris Green – waving a flag with the Welsh dragon, the star-spangled banner and the black, white and blue of Estonia, said: "Our son lives out in Tallin in Estonia – which is only 120 miles away from Russian tanks. It's understandable people there are getting quite concerned." Bronwen Green added: "We both like Obama. He seems to have his finger on the pulse."

Obama greeted the agog Mount Pleasant youngsters in Welsh, saying "bore da" – "good morning" – and then listened to a welcome message, thanking him for being the first serving US president to visit Wales.

The security effort around the summit, billed as the largest political gathering of world leaders to be held in the UK, is immense.

People cheer as the motor cavalcade with Barack Obama and David Cameron arrive in Newport. Photograph: Matt Cardy/Getty Images

Almost 10,000 police officers, many of them wearing special-issue light blue berets, have been drafted in to combat the threat of terrorist attack and to contain Thursday's march.

They are guarding all approaches to Newport and Cardiff, where a working banquet is due to take place on Thursday evening. They are patrolling the cities on foot, horseback, by bicycle, in helicopters and every type of marked and unmarked car available.

Officers carrying riot helmets lined parts of the M4, which cuts through Newport, while mobile fortified police cordons are in place outside Celtic Manor to stop the marchers getting to the steel fence that has been set up around the hotel.

Police have accepted they expect trouble from a minority and have promised robust action if demonstrations do turn ugly.

But the protest march was much smaller than organisers had hoped.

Several hundred rather than the thousands predicted marched from the cenotaph towards Celtic Manor accompanied by almost as many journalists and police officer.

The mood was generally upbeat and co-operative with the police even laying on shuttle buses for those who wanted to ride back rather than walk to the city centre.