(CNN) -- Two car bombs targeting Christians killed at least 38 people in southern Baghdad on Christmas.
In Afghanistan, two rounds of "indirect fire" hit the U.S. Embassy compound in Kabul, but no one was hurt.
The incidents highlight the security challenges with which both Iraq and Afghanistan are grappling.
Both countries have had a heavy U.S. military presence until recently.
The departure of U.S. forces from Iraq has done little to curb the near-daily cycle of violence. In Afghanistan, U.S. and Afghan officials are working on an important security pact to outline the future of American troops in Afghanistan.
In Iraq, a car bomb exploded outside a church in southern Baghdad just as worshipers were leaving a Christmas Day service, killing many. In another attack Wednesday, a car bomb went off at an outdoor market where many Christians shop, police said.
Altogether, at least 38 people were killed and some 70 others were wounded, the Interior Ministry said. The bomb outside the church killed 27 and wounded 56. The market attack left 11 dead and 14 wounded.
The U.S. Embassy in Baghdad condemned the attacks -- in the Dora area of Baghdad -- targeting "Christians celebrating Christmas."
"The Christian community in Iraq has suffered deliberate and senseless targeting by terrorists for many years, as have many other innocent Iraqis. The United States abhors all such attacks and is committed to its partnership with the Government of Iraq to combat the scourge of terrorism," according to a statement released by the embassy.
Iraq has experienced an uptick in sectarian violence this year as tensions simmer between the disaffected minority Sunni community and the Shiites, who dominate the government.
The U.S. Commission on International Religious Freedom notes that many people in small religious minority communities in Iraq, including Christians, have fled the country over the last decade and those that remain are "particularly vulnerable," facing "discrimination, marginalization, and neglect."
Sectarian warfare, especially between Sunnis and Shiites, raged during the Iraq War. Half or more of the pre-2003 Iraqi Christian community is thought to have left Iraq, the commission said in its 2013 annual report.
In 2003, there were thought to be 800,000 to 1.4 million Chaldean Catholics, Assyrian Orthodox, Assyrian Church of the East members, Syriac Catholics and Orthodox, Armenian Catholics and Orthodox, Protestants and evangelicals in the country, the group said.
Now, according to community leaders, the estimated number of Christians stands at around 500,000, the report said.
Two rounds of "indirect fire" hit the U.S. Embassy compound in Kabul, the embassy said. No one was injured.
"At approximately 6:40 local time in Kabul, approximately two rounds of indirect fire impacted the U.S. Embassy compound. All Americans are accounted for and no injuries were sustained," the embassy said in a statement Wednesday. "The Embassy continues to investigate the attack."
The embassy did not elaborate on what kind of rounds were fired, or where in the compound they landed.
A claim of responsibility was posted on the Taliban's official website. The group said it fired missiles at the U.S. Embassy and the main base of NATO, which leads the military coalition known as the International Security Assistance Force.
The incident comes at a pivotal time in U.S.-Afghan relations. The two countries are working on an important security pact. The deal will lay out the U.S. military presence in Afghanistan after 2014 when the NATO-led force of some 80,000 troops is scheduled to leave.
This month, U.S. Defense Secretary Chuck Hagel was in Afghanistan and said the security pact will be agreed upon despite a failure so far to forge a deal.
CNN's Mohammed Tawfeeq and Joe Sterling contributed to this report.