BOGOTA, Colombia (AP) _ Colombia's defense minister resigned Friday amid criticism over his handling of the country's counterinsurgency war and his alleged relationship with a jailed female drug trafficker.

Jorge Alberto Uribe will be replaced by Camilo Ospina, a lawyer who currently serves as President Alvaro Uribe's judicial counsel, officials said.

Uribe's decision to quit as defense minister follows a series of guerrilla attacks that have killed more than 300 troops this year and shattered government claims the rebels were nearing defeat.

Last month, he narrowly survived a no-confidence vote in Congress that left him politically weakened.

``I am leaving with the satisfaction of knowing that the armed forces are working toward the sole objective of securing peace in the country,'' Uribe told a news conference Friday. ``I feel I have accomplished my mission.''

Uribe will remain on the job until President Uribe, who is not related, returns from a trip to Europe next week and formally appoints Ospina, said Interior and Justice Minister Sabas Pretelt.

Uribe, a U.S.-educated businessman, was appointed less than 20 months ago despite having no prior military experience. It was hoped his no-nonsense, business-minded style would help turn the sprawling military into an effective, mobile force capable of taking the fight deep into enemy territory.

But while Uribe did oversee a massive expansion of the armed forces and a controversial new streamlined command structure, his sometimes abrasive manners and off-the-cuff remarks became a liability as President Uribe pushes for re-election next year.

Opposition lawmakers had been clamoring for the defense minister's resignation after he acknowledged that he had ties to Dora Alzate, 35, who is serving a nine-year prison sentence for cocaine smuggling, and had visited her in prison.

Uribe was also blamed by some lawmakers for sparking a bitter diplomatic dispute with neighboring Venezuela after he publicly conceded that Colombia had paid bounty hunters to abduct a senior rebel commander in Caracas before handing him over to police across the border. Venezuelan President Hugo Chavez denounced the operation as an affront on the country's sovereignty and briefly recalled his ambassador in protest.

Ospina, the new minister, faces what analysts predict will be a stepped up guerrilla offensive during the run-up to presidential elections in May 2006. President Uribe, whose hardline security policies have made him hugely popular, is still waiting for court approval before he can seek a second consecutive term.