A volunteer confronted Justin Trudeau for visiting a flood zone near Ottawa on Saturday, accusing the prime minister of holding up the line while people were filling sandbags as the region grapples with rising floodwaters.

Trudeau was in the Ottawa-Gatineau area to be briefed by emergency management officials and help with sandbagging efforts after heavy rain caused water to rise to dangerous levels.

Trudeau had worked with his son to fill sandbags and then took photos with some troops in Constance Bay, Ont., on the Ottawa River.

Then a man who identified himself as a volunteer voiced his frustrations with Trudeau, dismissing his presence as a "photo-op" and blaming the prime minister's security for long waits for people looking to obtain sandbags.

"You know how long you've held up people picking up bags?" the man asked Trudeau. "I've been waiting in line down the road for 30 minutes while you've been here soaking up the rays."

"While you're here, no one can pick up sand," he continued. "You held people up, all the RCMP and security held people up."

Trudeau responded to the volunteer by saying he understood the "frustrations with security" that accompanies the prime minister wherever he goes, and that his aim was to encourage more Canadians to volunteer.

The prime minister's executive assistant, Philip Proulx, said on Twitter that the RCMP said "no trucks had been blocked" due to the Trudeau's visit.

In an email, the RCMP confirmed to CBC News that a police motorcade for Trudeau "did not cause any delays during today's visit."

The general manager for the city of Ottawa's emergency and protective services department said in a statement Saturday evening that traffic in the area was higher than normal due to the high number of volunteers parking onsite and the presence of emergency vehicles and Canadian Forces.

"However, the city's emergency operations were not impeded and a traffic plan was in place to accommodate the [prime minister's] visit and the movement of traffic," Anthony Di Monte said in the emailed statement.