Callum Stewart (14) and Daniel Dawson (14) from Glenrothes High School, and Liam Boyle (13) and Charles Verner (13) from St Aloysius' College, Glasgow, came second and third.
McLay and McGowan beat stiff opposition from teams from as far and wide as Lockerbie in the south and the Shetland Isles in the north to design the winning entry in the West Point Bridge Design Contest.
Over 400 pupils registered on the website for the competition and entries continued to come in until seconds before the deadline, as the teams fought to finish at the top of the online leader board.
The pupils will receive their prizes of Amazon vouchers and £500 cash for their schools from David Glen and John Redpath of Jacobs, along with Edward Carr and Russell Cramond of Morgan Ashurst, which supported the competition.
The West Point Bridge Competition is an annual online contest to design the strongest, most cost-effective bridge using software developed at the academy.
The competition, held to mark National Science and Engineering Week, was organised by Jacobs graduate civil engineer Sarah Roberts through the ICE Bridges to Schools initiative, which aims to encourage interest in civil engineering among school children.
ICE Bridges to Schools co-ordinator John McPartlin said: "The final stages of the contest were very exciting, with the top teams clearly deserving winners. It is very exciting to see the next generation of Scottish engineers emerging."