The Wales Planning Inspectorate (WPI) has allowed test drilling for shale gas in the Vale of Glamorgan to go ahead on Llandow industrial estate.
It follows an appeal by Coastal Oil and Gas Ltd, Bridgend, which was refused permission.
The WPI has allowed drilling “in-situ lower limestone and associated strata for the presence of gas”.
Opponents feared drilling could lead to hydraulic fracturing, known as fracking.
Fracking involves the high-pressure fracturing of rocks such as shale with a mix of water, sand and chemicals.
Opponents in the UK and the United States, where it is widespread, say it can cause environmental pollution and sickness in local populations.
The planning inspector Emyr Jones said: “A significant number of objectors raise concerns as to possible future proposals for gas extraction and the process known as hydraulic fracturing in particular.
“Whilst I understand these concerns, the proposal before me does not include extraction, whether by hydraulic fracturing or otherwise.”
He said any fracking proposals would require a further application and the local development plan made it clear that the grant of planning permission for exploration would not indicate a presumption in favour of future exploitation of any minerals found.
The inspector also imposed a number of conditions, including drilling to be confined to between the months of October and March, a noise impact scheme and monitoring for vibration.
He said he was satisfied that the drilling would be at noise levels which would not have unacceptable impacts on local homes, business or species, such as lesser horseshoe bat.
BBC Wales’ environment correspondent Iolo ap Dafydd said originally there were concerns about noise, ground water and the effect and impact drilling might have on people who live and work nearby.
He said if controversial fracking was to take place there would have to be another application from the company.
“Fracking is the process of actually fracturing hydraulically those rocks to release gas which are contained with these rocks deep underground,” he said.