I had the same exact thing happen to me about 2 weeks after buying my car, but it was 2nd gear. If you are out of warranty, be ready for about a $6,000.00+ repair. (The bill for the dealership just in parts was like $5,200.00) I was under warranty though.
They had to repair the full 1st, 2nd and 3rd gear assemblies, install a new shift fork and miscellaneous other tranny components. It took them about 2 weeks and a lot of bulls*** from Mazda's corporate division.
I certainly hope you're still under warranty and have little to no mods done. Good luck.