SARAJEVO, Aug 11 (Reuters) - Canadian car parts maker Magna International has been given the green light by the Slovenian Environment Agency to start building a paint factory, the first phase of a potential 1.24 billion euro ($1.5 billion) investment.

The environment agency approved the project on Thursday and issued a detailed technical guideline of steps the company must take to protect natural resources and air at the site.

The paint factory would create 400 jobs and is the first of four phases which would create about 6,000 positions in total and include a car factory with the capacity to assemble 100,000 to 200,000 vehicles a year, making it one of the largest investment projects in Slovenia to date.

The environment agency approval was the last major step in clinching the investment. Magna had said it would probably build the paint factory elsewhere in Europe if the Slovenian project had fallen through.

The ex-Yugoslav republic, which joined the eurozone in 2007, exports about 70 percent of the goods it produces with cars and car parts accounting for a significant proportion.

France’s Renault has a production plant in the country while a number of Slovenian companies produce metal and textile products for most global car producers.

Magna International is the world’s third biggest car parts manufacturer, employing 161,000 people with 327 manufacturing operations in 29 countries. ($1 = 0.8457 euros) (Reporting by Daria Sito-Sucic; editing by David Clarke)