The Jama Masjid, the disused mosque inside Uparkot Fort, was converted from a palace in the 15th century by Gujarat sultan Mahmud Begada and has a rare roofed courtyard with three octagonal openings that may once have been covered by domes. It's a shame about the graffiti, but the delicate mihrab (niche indicating the direction of Mecca) stonework and the forest of columns are still stunning. From the roof, the city views are excellent.