The firm plunged into the red in 2006 when problems at its international arm, which has since been closed down, and its building division helped blow a £62 million hole in its accounts.
But a year of restructuring and bringing new blood into the business will see Costain pay a dividend for the first time in 17 years.
Chief executive Andrew Wyllie said: "We have very much delivered on the promises we made. We had a clear set of objectives and we have delivered on all of them.”
The firm has focused on working for more blue chip clients and last year added retailers Marks & Spencer and Sainsbury to a list that already includes retail giant Tesco, airport operator BAA and the Highways Agency.
Mr Wyllie, who has been at the company just over two years, has weeded out under-performing managers and recruited several hundred new staff including project managers, business development and commercial managers. Costain now employs just over 2,000 people.
The firm’s overseas workload accounted for just £20 million of its £878 million turnover last year and Mr Wyllie admitted it was biding its time on foreign opportunities. He said: “We did too many one-off jobs for one-off clients overseas. The focus is on the UK at the moment.”
Costain still has a presence in Zimbabwe but Mr Wyllie added: “It’s a very small operation but we have a responsibility there. It is no financial exposure to us and we’re just keeping our heads down.”
Costain’s building arm, helped by the sale of investments, and its oil and gas operations both returned to profit last year but the star performer was its civil engineering business. Water, road and rail contracts helped the business turn in a £16.9 million operating profit.
Later this spring, the firm will complete the move of its headquarters building a few miles to a new complex on the outskirts of Maidenhead in Berkshire.