SAN FRANCISCO — Facebook said on Thursday that it had repaired a technical error that led to long lapses in service at its various properties, including Instagram, WhatsApp and Messenger.

The interruption lasted nearly 24 hours on some of the services and was the longest in Facebook’s recent history. It was an eye-opening reminder that even the most powerful internet companies, employing the best computer scientists and cutting-edge technology, can still be crippled by human error.

“All of the big web companies have multiple lines of defense, but sometimes a coding mistake made by one engineer can make its way onto many thousands of computers and cause major errors,” said Alex Stamos, a former chief security officer at Facebook and a lecturer at Stanford University. “In other words, rebooting something as complex as Facebook is very, very hard.”

A “server configuration change” made on Wednesday had a cascading effect through the company’s network, a Facebook spokesman said. That created a repeating loop of problems that kept growing and could not be immediately fixed, according to one current and one former Facebook employee, who spoke on the condition of anonymity because they were not allowed to talk to reporters.