Task: Question Generation
Input (English): In 118 BC, King Micipsa of Numidia (current-day Algeria and Tunisia) died. He was succeeded by two legitimate sons, Adherbal and Hiempsal, and an illegitimate son, Jugurtha. Micipsa divided his kingdom between these three sons. Jugurtha, however, turned on his brothers, killing Hiempsal and driving Adherbal out of Numidia. Adherbal fled to Rome for assistance, and initially Rome mediated a division of the country between the two brothers. Eventually, Jugurtha renewed his offensive, leading to a long and inconclusive war with Rome. He also bribed several Roman commanders, and at least two tribunes, before and during the war. His nemesis, Gaius Marius, a legate from a virtually unknown provincial family, returned from the war in Numidia and was elected consul in 107 BC over the objections of the aristocratic senators. Marius invaded Numidia and brought the war to a quick end, capturing Jugurtha in the process. The apparent incompetence of the Senate, and the brilliance of Marius, had been put on full display. The populares party took full advantage of this opportunity by allying itself with Marius.
Output (English): When was Gaius Marius elected to the position of consul?