In January 1701 Charles XII decided to increase the forces in Livonia and Estonia by creating a militia. One of the first to act along these lines was the reverend Adrian Virginius in Odenpäh (Est. Otepää). On 30 Januari Governor General Dahlbergh wrote to Virginius, commending him for his desire to serve the King by recruiting a militia in his parish. As Virginius had managed to collect 112 men Dahlbergh believed it best to divide them into two companies. This meant that two captains, two lieutenants and two ensigns along with non-commissioned officers would be needed and Dahlbergh asked Virginius to provide some names (LVVA, Fond 7349, op.1, vol. 53). This was apparently done quite soon as Dahlbergh on 11 February could sign commissions for officers and send them to Gustaf Adolf Strömfelt in Dorpat. In the letter Dahlbergh also asked for suggestions for commanders of the militia. Apparently Dahlbergh was considering forming two regiments, one in the Estonian district and one in the Latvian district. (Ibid.). Strömfelt replied on the 17th, stating that he had met with Virginius, discussed the matter and delivered the commissions. As for the appointment of a colonel Strömfelt reported that he had not had a chance to consult with his colleague Mikael von Strokirch, but personally he could think of no one but Lt. Col. Tolcks (likely Otto Hermann Tolcks), "a famous soldiers, who served well in the Polish war" (Otto Herman Tolcks was promoted to major in 1658). However, Strömfelt wrote, Tolcks was now fairly old... (LVVA, fond 7349, op. 1, vol. 321, pp. 68 ff.)
On 4 March Dahlbergh informed Strömfelt that he would be pleased with having Tolcks as colonel of the militia (LVVA, Fond 7349, op.1, vol. 53). On the 24th Strömfelt wrote back, saying that Tolcks had been inclined to accept, but eventually had declined due to his age and weak health. Strömfelt instead suggested the cavalry captain Hastfer as Colonel and Captain Wrangel of Sadjerw as Lt. Colonel. (LVVA, fond 7349, op. 1, vol. 321, pp. 85 ff.)
On 3 April Strömfelt was able to give more details. He had talked to Hastfer, who at first was hesitant but finally had agreed. Strömfelt had written to Wrangel and offered him the position of Lt. Colonel, but unfortunately Hastfer had produced his own candidate, a certain Lt. Captain Plater. Plater was however unwilling to settle for an appointment as Major. But, Strömfelt wrote, if two regiments were created Hastfer could get Plater and Wrangel be placed in the other regiment. (LVVA, fond 7349, op. 1, vol. 321, pp. 88 ff.)
On 7 April Dahlbergh informed Strömfelt that he had decided to solve the problem in another fashion. Instead of two regiments there would be several batallions, each consisting of 6 companies of 50 soldiers each, and under the command of a Lt. Colonel. (LVVA, Fond 7349, op.1, vol. 53) .
This apparently solved the problem. On 26 May Strömfelt wrote to Dahlbergh saying that Captain Wrangel had arrived in Dorpat to take command of the Dorpat militia batallion. Wrangel had proposed that he and his officers would be given the authority to personally go the parishes and choose the soldiers and then start training them, a method reportedly used in Estonia. (Riksarkivet, Ekonomiståthållaren i Dorpat Gustaf Adolf Strömfelts arkiv, vol. 4)
On the same day Wrangel also wrote to Dahlbergh, accepting the offered position. (LVVA, Fond 7349, op. 3, vol. 62, pp. 134 ff)