A 16-year-old boy has been airlifted to hospital after he fell unconscious while scuba diving in waters near Geelong.

Ambulance Victoria spokesman John Mullen said two friends, both 16-year-old boys, were diving in waters off Portarlington when one of the teenagers ran into trouble about 4.20pm on Sunday.

Mr Mullen said the boy was about 20 metres deep when he experienced difficulties with his equipment and fell unconscious.

While his diving partner spotted him and managed to pull him to the surface, the pair's quick ascent caused them to experience decompression sickness.

Both teenagers required treatment by paramedics on the foreshore.

The boy who was found unconscious was then airlifted to The Alfred hospital in a serious but stable condition.

His friend was later transported to The Alfred in a stable condition.