Colombia has been mired in a nearly 40-year conflict between leftist rebels , rightist paramilitaries and the government .