The owners of the former Aberthaw power station have been granted a High Court injunction against trespassers.
It follows a spate of online videos by 'urban explorers' who managed to enter the coal-fired plant, which was decommissioned in March 2020.
CCR Energy, which brought the site for £8 million in 2022, says the injunction covers land within the construction design and management boundary and runs until March 2027.
Demolition work is currently taking place at the former power station, which has been earmarked for a green energy hub.
But the energy firm stressed it does not affect the nearby section of the Wales Coast Path, which remains open to the public.
A CCR Energy spokesperson said: "This supports our continued commitment to ensuring the highest standards of safety and security on the site while demolition and remediation works continue."
"The injunction will help prevent unauthorised access and trespassers, safeguarding both the public and on-site workforce. Warning notices will be displayed around the boundary to make the restrictions clear."
"The injunction applies exclusively to CCR Energy owned land within the CDM boundary and does not affect the coastal path - which remains open and fully accessible to the public."

CCR Energy is a subisdary of the Cardiff Capital Region, a group of ten local councils in South East Wales, including the Vale of Glamorgan.
They plan to transform the former Aberthaw power plant, which dates back to the early 1960s, into a "cutting-edge" low carbon destination.
A spokesperson added: "Beyond energy, the vision extends to delivering economic regeneration for the region - supporting new, high-value jobs, attracting investment, and fostering a hub for sustainable technologies."
"We remain committed to transparent engagement with local communities and stakeholders throughout the entire redevelopment journey and will continue to provide timely updates as work at Aberthaw progresses."
Earlier this year, it emerged CCR had settled a legal dispute for £5.25 million after the High Court ruled a contract to demolish the power station had been awarded unfairly - with the findings of an independent review due to be published by the end of the year.

Post Office Seeks New Operator in Dinas Powys as Village Faces Loss of Its Last Branch
Gardening team praised after helping police clear fallen tree near St Brides Major
Specsavers calls on children in Barry to design Wales Deaf Rugby World Cup shirts
Whitmore High Named One of UK’s Best Workplaces for Development
Steel Signing Marks Major Milestone in St Richard Gwyn School Redevelopment
Two Rescues in Record Heat as Volunteer Teams Respond to Afternoon Emergencies
Police find evidence of a large-scale cannabis cultivation at Riverside Place property fire
Network Rail confirm closure of Brookside level crossing in Dinas Powys
Police given powers to ask people to leave Comeston Lakes Country Park
Planned children’s role play centre could be given the go-ahead by Vale Council
Marie Curie Garden Fayre deemed huge success
Council seeks views on Future of Colcot Sports Centre and Buttrills Playing Fields
First Minister quizzed on further devolution, budget decisions, and misinformation in FMQs
Extreme heat leads to changes to services and closures
Severe Heat Warning Set to Disrupt Rail Travel Across South Wales This Week
Communities asked to support older people across Wales during severe heat warning
Caribbean Community Wales Brings Wales‑Wide Launch to Barry This Weekend
Community Award winner calls for sanitary bins in men’s toilets after living with prostate‑cancer‑related incontinence
Cardiff Airport Backs Holiday Safety Campaign Honouring Rhoose Teenager Tom Channon