Environment Canada has confirmed that not a drop of rain fell over Vancouver and Victoria in July, while Toronto and Fredericton experienced the highest rainfall on record.

Vancouver recorded 411 hours of sunshine for the month — the first time the city has been precipitation-free since 1937 when tracking began on rainfall statistics.

CBC meteorologist Ross Hull said that July is often one of the driest months for Vancouver and Victoria, but July saw an extended period of dry weather that led to new records being set.

hi-bc-130727-dry-spell-vancouver-brown-grass-sunbathers-1-4col

Vancouver, a city with a rainy reputation, broke the record this year for the sunniest July ever. (CBC)

Several other B.C. cities set records for the driest July, including Vernon, Revelstoke and Kamloops. A ban on campfires went into effect today for much of southern B.C.

Vancouver just squeaked into the record books, because rain began falling at the measuring station at Vancouver International Airport early on Aug. 1, barely an hour after the precipitation-free record was claimed.

Elsewhere in the country, Fredericton registered the wettest July on record with 226 mm of rainfall in July. Toronto and Windsor, Ont., also hit new highs for rainfall last month.

In Toronto, a storm brought 120 mm of rain, which caused flooding and knocked out power to 300,000 residents, and broke the city's record for rainfall in a single day.

Heavy rain in Fredericton also caused serious flooding in the area and cancelled several outdoor activities. It was the rainiest July since recordkeeping began in the 1870s.

"We have seen extremes in certain parts of the country," said Hull.

He attributed the unusual rainfall patterns in part to the position of the jet stream, which he described as a "sort of atmospheric master of ceremonies."

"In general, if it moves north of where you are, you will see dry weather and above average temperatures. That was the case for B.C. during the dry and sunny streak. It's been a different story for eastern parts of the country where the jet stream has moved below the area — meaning more unsettled weather and cooler conditions at times," he said.

"In some cases if the jet stream moves over a particular area it then acts as the 'storm track,' and that's been the case for Central Canada and the Maritimes at times this summer."

With files from The Canadian Press