Turkey's consulate general in the northern Iraqi city of Mosul was attacked early on July 27 but there were no reported casualties, the Turkish foreign ministry said in a written statement.
Mortar rounds had fallen close to the building, one official said.
"We condemn this attack...in the strongest terms and expect those responsible to be brought to justice as soon as possible," the ministry said.
The ministry said the attack coincided with a U.N. Security Council meeting held at the request of Iraqi authorities to discuss an attack in northern Iraq last week "at a time when our country was unfairly accused and targeted."
Eight people were killed and 23 were wounded in an attack on a mountain resort in Iraq's northern Dohuk province last week. Turkey has rejected claims by Iraqi officials and state media that it carried out the attack.
Turkey regularly carries out air strikes in northern Iraq and has sent commandos to support its offensives against the Kurdistan Workers' Party (PKK) based there.
"We once again reiterate our call to the Iraqi authorities to focus on the fight against terrorism and to put an end to terrorist presence on their territory," the ministry said.
State-owned Anadolu news agency quoted Turkey's U.N. representative Öncü Keçeli as saying at the Security Council meeting that several mortar rounds had fallen close to the consulate as they talked.
According to two security sources, four landed within the perimeter of the consulate facility early on July 27.