While the Chetniks were an anti-Axis movement in their long-range goals and did engage in marginal resistance activities for limited periods, they also carried out for almost all of the war a tactical or selective collaboration with the occupation authorities against the Partisans. This was demonstrated in late 1942 and early 1943, when Ostojić planned and oversaw the Chetnik involvement in the large Axis anti-Partisan offensive Case White alongside Italian troops. In 1944, he became a leader of the Chetnik forces in Herzegovina, and along with Dobroslav Jevđević was involved in attempts to come to terms with the Allied forces. In late 1944, as the Partisans tightened their grip on the country and the Soviet Red Army assisted in the capture of Belgrade, he rejoined Mihailović in northeastern Bosnia but they could not agree on what course of action to take, continue fighting the Partisans or attempt to flee Yugoslavia. Ostojić, along with Chetnik leaders Pavle Đurišić and Petar Baćović and Chetnik ideologue Dragiša Vasić decided to move west to the area of the Ljubljana Gap in modern-day Slovenia where other collaborationist forces were concentrating. In early April 1945, faced with attacks by the Partisans and the Armed Forces of the Independent State of Croatia (, HOS) along their route, the combined Chetnik force was defeated by HOS forces in the Battle of Lijevče Field, after which Ostojić was captured by the Ustaše in an apparent trap. He was killed in the Jasenovac concentration camp alongside Đurišić, Baćović and Vasić.