Everyone here is right, perform as much as possible. The higher pressure situation the better. I played my masters recital (classical guitar) in front of a jury of 3 professors, 20 guitarist grad students, and 150 people-most of them music majors, at Florida State University. It helps to play in higher pressure situations because then the lower pressure situations don't even register.
Obviously, you didn't make mistakes because of lack of practice but you should examine the way you practice. After all, practice does NOT make perfect. PERFECT PRACTICE makes perfect. Are you practicing your pieces as whole? Do you just play through them over and over? That is not the best way to practice. The best way to practice is to break the piece down and practice in segments, the smaller the better. 1 measure at a time. This way you can focus on the smallest of details, and get plenty of reps in of the hardest passage and you can correct your mistakes while they are still fresh in your mind rather than waiting to play the entire piece again. The hardest passage in a piece deserves special attention, not merely the same attention as the rest of the piece.
Also, don't rely on muscle memory too much. You need to be able to think your way through the piece. You can practice without even touching your guitar. Muscle memory is good to have, just don't rely on it too much. Try singing your part.
Lastly, practice with a metronome. Go very slow. VERY slow. Don't allow yourself to increase the speed of that metronome until you've played the passage absolutely perfectly. No buzzes, no loud finger scrapes on the strings, no uncertainty in your fingers. This will help your consistency and reduce mistakes. If you perform faster than you practice (and most people do) you will increase the likelyhood of making a mistake. Practice playing 10% faster than you intend to perform but only after you have mastered the piece at slower speeds.
Good luck!