A Karnataka court on Saturday sentenced a man to 20 years of imprisonment and slapped a fine of Rs 30,000 on him for raping a minor girl under the pretext of recovering a Rs 10,000 loan that he had given to her deceased father.