A lawsuit filed in Los Angeles federal court Friday on behalf of five detained immigrant children charges the Trump administration with unlawfully prolonging their detention in harsh conditions.

The complaint alleges the U.S. is detaining immigrant minors in overly restrictive detention centers, denying their release to family members or other custodians and improperly medicating the minors with psychotropic drugs. It also says the government is blocking their access to attorneys.

The...