WASHINGTON (CNN) -- The new U.S. commander in Afghanistan plans to issue a directive that will restrict the use of U.S. airstrikes in areas where civilian casualties might be a risk, his spokesman told CNN.

Gen. Stanley McChrystal will issue a directive on airstrikes by the end of the week.

Gen. Stanley McChrystal will issue the classified directive by the end of this week, according to Rear Adm. Gregory Smith. It will tell troops that they have the right to defend themselves when they are under fire, but that they must consider the possibility of casualties when firing into an area where there might be civilians.

The new guidelines tell commanders, "in a situation where you are receiving fire from the enemy in a potentially populated structure and there is an option to extract yourself and your troops, consider that as a first option," Smith said. "Don't simply return fire where you have unknown consequences against innocent civilians that may be inside that structure."

There is growing opposition in Afghanistan to airstrikes that have killed a number of civilians.

Previously, airstrikes have been called occurred in populated areas where commanders were not able to determine whether civilians were present.

The Pentagon last week released the results of an airstrike investigation that killed at least 26 civilians in Farah Province, according to the report.

The airstrike in May, which the Afghanistan government said killed more than 140 civilians, has caused a lot criticism of the U.S. military.

The U.S. investigators found that the troops on the ground and in the air were not able to confirm whether civilians were present before dropping the bombs.

While not addressing them in detail, the unclassified report lists a number of recommendations, including reviewing the appropriateness of aircraft used for close air support, and refining guidance for the use of bombs and close air support in situations where civilians could be present.

At his confirmation hearing this month, McChrystal told the Senate Armed Services committee that airstrikes need to be limited and precise.

"This is a critical point. It may be the critical point. This is a struggle for the support of the Afghan people. Our willingness to operate in ways that minimize casualties or damage, even when doing so makes our task more difficult, is essential to our credibility," McChrystal said. "I cannot overstate my commitment to the importance of this concept."

McChrystal also wants troops to make protection of populated areas a priority, and to try to push Taliban fighters into remote areas.