a group of people posing for the camera© Jose Luis Magana/Associated Press

President Biden told world leaders that the U.S. is on pace to leave Afghanistan by Aug. 31, according to the White House, as the Taliban said they would prevent Afghan citizens from reaching Kabul’s airport to board evacuation flights.

The president also instructed the Pentagon and the State Department to develop contingency plans in the event the timeline for leaving Afghanistan must be adjusted, White House press secretary Jen Psaki said.

Mr. Biden “made clear that with each day of operations on the ground, we have added risk to our troops” from Islamic State, Ms. Psaki said, adding that the evacuation effort would depend on cooperation from the Taliban.

The U.S. military started moving non-essential equipment out of Afghanistan earlier this week, and some personnel began leaving Tuesday, Defense Department officials said.

The president is scheduled to speak about Afghanistan later Tuesday afternoon.

It wasn’t clear how the Taliban decision to block Afghans from leaving the country would affect the U.S. effort to extract translators and others who assisted Americans over the last two decades. Ms. Psaki said the White House is reaching out to Afghans who have secured Special Immigrant Visas to give them instructions on when and how to get to the airport. She said the U.S. expects the Taliban to let those individuals into the airport.

On Tuesday night, the Taliban blocked roads to the airport, shooting in the air to disperse crowds, according to witnesses. An Afghan who worked for a Western organization and tried to reach the airport said he had been told by the Taliban fighters manning the checkpoint that they are under orders to only let through convoys organized by foreign embassies. Individuals, even if holding valid travel documents, were being turned away.

The group has said it won’t accept the presence of foreign forces beyond Aug. 31, heightening the risk of attacks after that date. U.S. officials have separately raised concerns about what they have described as a growing terrorist threat from Islamic State outside the airport.

Asked whether the U.S. would be able to evacuate all Afghans who are eligible for Special Immigrant Visas by Mr. Biden’s deadline, Ms. Psaki said, “We will certainly have additional folks eligible to come to the United States after Aug. 31 that we will help relocate.”

Mr. Biden is facing pressure from some U.S. allies to extend the deadline amid concerns about the logistical hurdles of evacuating thousands of U.S. citizens, international officials and at-risk Afghan allies over the next week.

The president met virtually on Tuesday with leaders of the Group of Seven nations, where he warned that remaining in Afghanistan after the deadline risked lives, people familiar with his remarks said.

European Council President Charles Michel, one of the European Union’s top two officials, said that several European leaders expressed concerns about the U.S. plan to withdraw by Aug. 31. He said the Europeans called on Mr. Biden to secure the airport as long as necessary to complete the evacuations. The G-7 meeting didn’t resolve any of the issues surrounding the withdrawal from Afghanistan, another European official said.

Following the meeting, the leaders committed in a statement to working together to evacuate citizens of their countries and at-risk Afghan allies, but didn’t say whether Aug. 31 remains the working deadline.

Earlier Tuesday, Taliban spokesman Zabiullah Mujahid said that the group was asking the U.S. to stop “inviting” Afghans to leave the country because Afghanistan needs its skilled citizens at home. Foreigners remain free to depart, he said.

“Our people, our engineers, our doctors, professors and those who have been educated. The country needs their talent, and they should not be taken to foreign countries,” he said in his second press conference since the Taliban seized Kabul on Aug. 15.

Afghan citizens would no longer be permitted to come to the airport because the crowds there create a risk to their lives, he said.

It wasn’t clear how strictly the Taliban would implement the new ban. One person within the Taliban movement, reached for a clarification, said the new policy applied only to those Afghans without documentation for foreign travel, to reduce the chaotic crowds around the airport, and that those cleared for onward travel could still depart.

Aid groups working on getting people out of Afghanistan were told by Western officials involved in the effort that Friday would be the last day to travel through the Kabul airport. After that, they have been told, the U.S. will focus on wrapping up operations to meet the Aug. 31 deadline.

Rumors that anyone who can get inside the U.S.-controlled airport will be flown out abroad have attracted thousands of Afghans without any flight bookings or other arrangements to the airport’s gates, making access for those who do have such travel permissions extremely difficult. People have died in stampedes and shootings at the gates over the past nine days.

Michelle Bachelet, United Nations High Commissioner for Human Rights, said Tuesday that the world body had received credible reports of serious human-rights abuses in many areas under effective Taliban control. Those abuses include summary executions of civilians and members of the Afghan national security forces, restrictions on the rights of women, and repression of peaceful protest, she told a meeting Tuesday of the U.N.’s Human Rights Council.

“There are grave fears for women, for journalists and for the new generation of civil society leaders who have emerged in the past years,” Ms. Bachelet said.

Separately, Mary Lawlor, the U.N. Special Rapporteur on Human Rights Defenders, said that hundreds of rights activists were currently stuck in Afghanistan, including some with visas. “These are the bravest people in the world,” she said in an interview. “Their situation is desperate, dire, it is a nightmare.”

The emergency G-7 meeting Tuesday was convened by the U.K. to consider whether to prolong evacuation operations.

U.K. Prime Minister Boris Johnson said after the meeting that leaders intend to press the Taliban to guarantee refugees a safe route out of the country after Aug. 31, as a condition of future engagement.

“The No. 1 condition that we’re setting as G-7 is they’ve got to guarantee—right through Aug. 31 and beyond—safe passage for those who want to come out,” he said in a broadcast interview.

In its statement, the G-7 said Afghanistan must not again become a haven for terrorists and a Taliban-led government must respect human rights, especially those of women and girls.

“The legitimacy of any future government depends on the approach it now takes to uphold its international obligations and commitments to ensure a stable Afghanistan,” the statement said.

Western officials say the Taliban are seeking international recognition of their takeover, and foreign aid, points of leverage that could be used to extract concessions from the group as the U.S. and others race to evacuate their own citizens and Afghan allies amid chaos at Kabul airport, which is currently controlled by U.S. troops. The Taliban are also seeking to avoid new sanctions that could hit the impoverished country’s finances.

The Taliban say they won’t allow international troops to remain past the deadline and can’t guarantee that any troops who stay won’t be subject to attack.

Britain and some European nations are warning there isn’t enough time to get everyone they want out of Afghanistan by Aug. 31. In Kabul, thousands of Afghans are still struggling to get into the airport, while thousands more are inside waiting for flights. There are also thousands of U.S. and allied troops, as well as equipment, to take out from Kabul airport by the deadline, meaning that the civilian evacuation has to effectively end before Aug. 31.

Central Intelligence Agency Director William Burns met secretly with the Taliban’s top figure, Abdul Ghani Baradar, in Kabul on Monday, U.S. officials said, in what appears to be the highest-level engagement between the Biden administration and the Taliban to date. Details of the meeting weren’t immediately available. The CIA declined to comment.

British Defense Secretary Ben Wallace said the threat from Islamic State and other militants was increasing as the clock ticks down. He said that the international troops have benefited from a ring of security provided by the Taliban around the airport to keep Islamic State out. The Taliban are in a violent rivalry with Islamic State, which has a local branch in Afghanistan.

“Terrorist groups such as ISIS would like to be seen to take credit or like to be seen to chase the West out of the airport,” said Mr. Wallace. “We are very, very vulnerable should these terrorists choose to do something.”

Washington says there is time to get every American out. But Mr. Biden’s national security adviser, Jake Sullivan, said Monday that the U.S. is still trying to figure out how many Americans are left in Afghanistan.

A U.S. official involved in the effort said Monday that the U.S. is currently evacuating mostly American citizens, green-card holders, and the spouses and children of those individuals. Afghans who were employed by the embassy or other U.S. agencies in Afghanistan haven’t yet been evacuated in significant numbers.

The Taliban see the international effort at the airport, which includes almost 6,000 American soldiers, as a continuation of what they view as the foreign occupation they have battled for two decades. They also see the scenes of Afghans desperate to flee their rule at the airport as undermining their attempts to show they have brought stability and peace to Afghanistan.

Under a February 2020 agreement between the U.S. and the Taliban, Washington agreed that all international troops would leave by May 1, 2021. The U.S. and the Taliban accuse each other of violating the terms of that agreement. Mr. Biden, who inherited the accord when he came into office this year, originally said he would withdraw U.S. troops by Sept. 11—a deadline some allies would like to see reinstated—but later moved that to Aug. 31.

After May 1, the Taliban unleashed a nationwide offensive, racing through the country and seizing Kabul on Aug. 15.

About 21,600 people were evacuated from Kabul in the 24-hour period ending at 3 a.m. Eastern time, according to the White House, a significant pickup from a day earlier. U.S. military flights carried 12,700 people while coalition flights carried another 8,900 people. Since the airlift operation began Aug. 14, the U.S. has helped evacuate about 58,700 people, the White House said.

Write to Saeed Shah at saeed.shah@wsj.com, Jason Douglas at jason.douglas@wsj.com and Andrew Restuccia at andrew.restuccia@wsj.com