"Anti-illegal immigration security teams of the Zuwara Security Directorate managed today to rescue 27 illegal immigrants from inevitable death," Zuwara Security Directorate said in a statement.
The rescued immigrants are from different African and Arab nationalities, and include five women and a little girl, the statement said.
The immigrants were provided with medical assistance, as the security services in the city started an investigation into the incident.
On Wednesday, the Libyan navy announced rescuing 574 illegal immigrants off the country's western coast in three separate operations.
Libya has become a preferred departure point for illegal immigrants hoping to cross the Mediterranean Sea into Europe due to insecurity and chaos in the North African country following the 2011 uprising that toppled former leader Muammar Gaddafi.
Improved weather conditions have increased the flow of migrant boats from Libya towards Europe, particularly off the country's western coast