In Gideon v. Wainright, it was determined that a criminal defendant who cannot afford an attorney is entitled to have a court appoint an attorney, and the government must pay for the attorney.
Even when counsel is found to be competent, it has been found that a conflict between counsel and defendant that cannot be resolved would create a situation where the defendant is being denied the right to counsel.