TRAVERSE CITY, Mich. — The Kirtland’s warbler, a colorful songbird that was nearly wiped out by habitat loss and a wily rival, has bounced back and is ready for removal from the endangered species list, federal officials said Wednesday.

The U.S. Fish and Wildlife Service proposed dropping legal protections for the warbler but acknowledged efforts will be needed indefinitely to preserve jack pine stands where the birds spend summers and raise their young. They nest primarily in Michigan’s northern Lower Peninsula, although their range has widened to the Upper Peninsula, Wisconsin and Ontario as their numbers have risen. They migrate to the Bahamas for winter.

Another requirement will be continued vigilance against brown-headed cowbirds, which invade warblers’ nests and displace their babies.

“Kirtland’s warblers were once on the brink of extinction and one of America’s rarest birds, but today they represent the power of partnership to recover imperiled wildlife,” said Tom Melius, the Fish and Wildlife Service’s Midwest regional director.

The agency will accept public comments on its proposal until July 11 and will have until April 2019 to make a final decision.

Environmental groups hailed the move as evidence that the Endangered Species Act, a frequent target of conservatives who say it hampers economic growth and property rights, is working.

“Without it, we would have lost the warbler forever,” said Noah Greenwald of the Center for Biological Diversity. “It’s hard work to recover endangered species like the Kirtland’s warbler, but today’s decision proves it can be done.”

A victim of its own peculiar habitat requirements, the warbler — which has steel-gray back and tail feathers and a yellow belly — was among the first animals named to the endangered list, getting added in 1967. The population was estimated at 167 pairs in 1974, based on a census of singing males. It hit the same low point in 1987.

Females cannot be counted because they do not sing, but biologists assume each male has a female partner.

The warbler has recovered steadily since then, aided by a coalition of government agencies and nonprofit groups that conserved its breeding grounds. The most recent count, in 2015, turned up 2,383 singing males, which was well above the recovery goal of 1,000.

Kirtland’s warblers build nests each spring at the feet of jack pines between 5 and 23 years old and 5 to 15 feet (1.7 to 5 meters) high, which are abundant in the sandy soils of northern Michigan.

Wildfires historically swept through the region every few decades, burning down larger jack pines and popping open cones that produced new ones, ensuring an adequate supply of young trees for the warblers.

But modern fire suppression broke the cycle. As part of the warbler recovery effort, federal and state agencies developed a system of logging and replanting trees to imitate what nature previously did.

Those measures will continue after the species is declared recovered, said Scott Hicks, a Michigan field office supervisor for the Fish and Wildlife Service. A nonprofit called the Kirtland’s Warbler Alliance will help raise funds to cover the program’s annual cost of up to $4 million.

The Michigan Department of Natural Resources will take charge of another urgent task: battling brown-headed cowbirds, which lay eggs in the nests of other songbirds, including warblers. Cowbird chicks out-compete young warblers, which perish as their seemingly oblivious parents feed and nurture the interlopers.

Since the early 1970s, the Fish and Wildlife Service has maintained dozens of traps in the warbler habitat zone. Decoys or food lure cowbirds inside, where they’re euthanized.

The strategy may be paying off. Cowbird infestation appears to be easing, said Dan Kennedy, endangered species coordinator for the Michigan department, which will devise a future plan after getting results of a study this summer.

“The recovery of Kirtland’s warbler is a great Michigan success story,” agency director Keith Creagh said.