Two late tries from Simon Danielli spared Scotland's blushes against Romania in their opening Rugby World Cup match.
Scotland, who had only lost twice to their opponents in 12 meetings, were 24-21 behind with just 12 minutes remaining having led 21-11.
Chris Paterson, who kicked 14 points, pulled his side level before Danielli finished off a great move.
Danielli went over again as Scotland gained a bonus point.
They were two outstanding scores, but Scotland's performance was marred by handling errors, nerves and an unconvincing pack.
Andy Robinson's men appeared to be cruising after Mike Blair and Joe Ansbro had moved them into a 15-3 lead after 20 minutes.
However, Romania's superior forward strength began to cause panic among the men in blue who conceded their first try when Mihaita Lazar touched down following a rolling maul.
It was 18-11 at the break and the teams exchanged penalties before number eight Daniel Carpo broke off a scrum to score and move The Oaks into a shock 24-21 lead.
However, Scotland rediscovered their verve of the first few minutes as Danielli rounded off two superb moves to give his side victory.
Coach Andy Robinson said Scotland had to grind out victories in the manner of one of the country's sporting heroes.
"I saw this as very much like Andy Murray playing his tennis matches, when he plays five sets," he said.
"You get put under that pressure in the second round, third round sometimes and it's how you come through it and then the focus is onto the next game.
"That's the key element for us - we mustn't play Romania when we play Georgia, we've got to play a new side.
"There are always challenges that are put up in front of us and it's how you deal with those challenges."
Scotland play Pool B opponents Georgia on Wednesday, before facing Argentina and then England.
Scotland: Paterson, Evans, Ansbro, S. Lamont, Danielli, Jackson, Blair, Jacobsen, Ford, Cross, Gray, Kellock, Brown, Barclay, Vernon.
Replacements: Parks for Jackson (52), Cusiter for Blair (61), Dickinson for Jacobsen (61), S. Lawson for Ford (68), Hines for Gray (52), Rennie for Barclay (62).
Romania: Dumitras, Ciuntu, Gal, Dimofte, Lemnaru, Dumbrava, Sirbu, Lazar, Tincu, Ion, Ursache, Petre, Macovei, Tonita, Carpo.
Replacements: Vlaicu for Dumitras (58), Surugiu for Dumbrava (51), Cazan for Sirbu (51), Zebega for Tincu (68), Florea for Ion (68), Popirlan for Petre (79), Burcea for Macovei (76).
Att: 20,000
Ref: Dave Pearson (RFU).