Southern California Gas Co. announced Thursday that, after nearly four months, the gas leak at its Aliso Canyon facility is under control.

More than 6,000 families were displaced and many schools closed due to a methane gas leak that began October 23. Residents complained of headaches, nosebleeds and nausea, which public health officials attributed to the gas' smell.

A relief well, which SoCal Gas began drilling in December, hit and intercepted the leaking well Thursday afternoon. The company is pumping fluids into the new well to keep the flow of gas under control.

This is not, however, a permanent solution. Cement will need to be poured into the relief well to stop the leak.

The California Division of Oil, Gas and Geothermal Resources will then carry out inspections and pressure tests to certify that the leak is closed. If they are successful, residents will have a little more than a week to move out of SoCal Gas' temporary housing and back into their homes.

Residents expressed relief that the well is one step closer to being sealed.

"We look forward to it being certified safe for residents to move home. The community is exhausted after living with these effects for over a hundred days and are excited to be back in their homes," Porter Ranch Neighborhood Council President Paula Cracium said in a statement.

SoCal Gas said it expects the cost of the leak to reach as high as $300 million. This covers the cost of temporary housing for Porter Ranch residents and capping the well. This estimate will likely increase to include damages from more than two dozen lawsuits, government penalties and the cost of mitigating pollution.