Mr. Maliki 's visit occurred against a backdrop of increasing accusations from the American ambassador in Baghdad , Zalmay Khalilzad , and American military commanders that elements in Iran are stoking violence in Iraq .