Complex sentence: As a title it was placed after the name of the certain military functionaries at the same time some Court functionaries were entitled to the agha title.
Split into simpler sentences: As a title for a civil or military officer, or often part of such title, it was placed after the name of certain military functionaries. At the same time some Court functionaries were entitled to the agha title.