Original: Out of office, Monroe returned to practicing law in Virginia until elected governor there as a Republican, serving from 1799 to 1802.
Simplified: Monroe was Governor of Virginia from 1799 - 1802.