The Environment Agency has launched an investigation after its new £3.8m flood prevention scheme leaked at the first time of asking.

Sunday night’s tide was high enough to force agency staff to close the flood gate that was built to protect the Steam Packet pub in Totnes.

But the water still got through to flood part of the pub car park.

At first it was thought a mooring rope had fouled a flap valve on the new barrier, allowing the tide in.

But after the car park flooded during a second high tide on Monday night, after the valve had been checked, an agency spokes­man said: “We need to get to the bottom of what the problem is. I think we will be looking at all options.”

The flood gate is one of four installed as part of the scheme designed to protect more than 200 homes and 204 commercial premises deemed at risk from flooding.

It has involved raising 1.4km of flood defence walls, as well as building the four steel flood gates – two at the Steam Packet Inn, one at New Walk, and a fourth at Dye House Quay.

The flood gate at the Steam Packet was the first to be tested druing this week’s high tides.

At first it was uncertain whether the water had leaked through the gate itself or come up through a drain inside the car park.

Initially a stray mooring rope was blamed for the problem.

The Environment Agency issued a statement on Monday saying its staff “investigated and found that a mooring line from a boat had got stuck under the flap valve.

“This meant the flap did not seal when the tide came up, allowing river water to pipe through into the car park.

“The line has been changed, and the Environment Agency will be in attendance for tonight’s high tide.”

But after the water got through again on Monday, a spokes­man said the agency would be investigating what had gone wrong.

Steam Packet manager Ian Durrance said the water had managed to get into the pub car park but put it down to “teething troubles”.

He said the Environment Agency was planning to sort out the problem and added: “It has taken them six months to do the scheme, so another day or so won’t matter.”

Work on the flood scheme actually began in June last year. In the last eight years, the town centre has twice come close to flooding and in 2014 it water came within an inch of causing a disaster, as combination of high tides and a storm surge left the River Dart so close to overtopping flood defence walls.

One of the last parts of the project to be completed was the installation of glass walls to raise the height of the defences in the area of the Waterside Bistro and other buildings at Mill Tail, which was carried out a fortnight ago. The agency is planning to mark the completion of the project in October this year with an opening ceremony.

Meanwhile, no amount of flood protection schemes can save unlucky drivers who park in the wrong place during a high tide.

A Nissan was in line for a soaking as the tide reached its peak on Monday night while the vehicle was parked on the Ashford slipway off The Plains just before 9pm on Monday.

The spot is notorious for giving drivers that sinking feeling when they return to their cars to discover that finding the town centre parking space was not as fortuitous as they had originally believed.