Hearts have been paired with Inverness, Raith Rovers, Cowdenbeath and Cove Rangers in Group C of the Betfred League Cup group stage.
The north section of the draw handed the Edinburgh club a reunion with their record league goalscorer and former manager John Robertson, now in charge at the Highland club. The clubs also recently agreed a player swap, with Hearts midfielder Angus Beith heading north and Inverness winger Jake Mulraney joining up at Tynecastle.
Raith and Cowdenbeath provide opposition from Fife, giving Hearts manager Craig Levein a chance to face two of his former clubs. Highland league winners Cove are the fifth team in the section. Group matches start on July 14, with fixture dates and television selections to be announced in due course.
Hearts will be eager to atone for last summer's Betfred Cup campaign, which saw them eliminated at the group phase. They beat Elgin City away and East Fife at home before losing away to Peterhead. Their final section match ended in a draw against Dunfermline, who then won on penalties to seal the fate of former Hearts head coach Ian Cathro.
Premiership newcomers Livingston were drawn in Group F alongside Hamilton, Berwick Rangers, Airdrie and Annan Athletic. Edinburgh City joined Motherwell, Queen of the South, Clyde and Stranraer in Group G. Lowland League Spartans were placed in Group H with Kilmarnock, St Mirren, Dumbarton and Queen's Park.
BETFRED LEAGUE CUP GROUP STAGE DRAW
Queen of the South